[Issue 13886] New: global.gaggedErrors ICE

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Dec 21 13:47:20 PST 2014


https://issues.dlang.org/show_bug.cgi?id=13886

          Issue ID: 13886
           Summary: global.gaggedErrors ICE
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: vlevenfeld at gmail.com

the following code is not valid but instead of producing an error message, hits
ICE

dmd: statement.c:756: ErrorStatement::ErrorStatement(): Assertion
`global.gaggedErrors || global.errors' failed.


import std.typecons;
import std.typetuple;

template X (T)
    {
        static if (is (typeof(T.init.bar) ))
            X U;
        else alias X = T;
    }
struct Y ()
    {    
        this (){}
        ~this (){this = null;}
        ref opAssign (S)(S){}
    }
struct Z () {    }

template foo ()
    {        
        auto foo ()            
            {        
                auto args = tuple ;
                static if (is (Data))
                    0;

                return Z!((args.baz.expand))();
            }
    }
auto baz (T)(T)
    {
        staticMap!(X, T) abc;

        return tuple;
    }
auto bar (R)(R )
    {Y!();}


void main ()
    {
        foo;
    }

--


More information about the Digitalmars-d-bugs mailing list