[Issue 752] New: Assertion failure: 'e->type->ty != Ttuple' on line 4518 in file 'mtype.c'

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 26 12:04:08 PST 2006


http://d.puremagic.com/issues/show_bug.cgi?id=752

           Summary: Assertion failure: 'e->type->ty != Ttuple' on line 4518
                    in file 'mtype.c'
           Product: D
           Version: 0.178
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: sean at f4.ca


The code:

    struct Tuple( TList... )
    {
        const size_t length = TList.length;

    private:
        typeof(TList[0])                     head;
        static if( length > 1 )
            mixin .Tuple!((TList[1 .. $]))   tail;
    }

    void main()
    {
        Tuple!(int, long) T;
        T val;
        printf( "%u\n", val.length );
    }

Gives the following errors:

    C:\code\src\d\test>dmd test
    test.d(9): Error: Integer constant expression expected instead of
cast(int)(__dollar)
    test.d(9): Error: string slice [1 .. 0] is out of bounds
    Assertion failure: 'e->type->ty != Ttuple' on line 4518 in file 'mtype.c'

    abnormal program termination

The __dollar issue can be eliminated by replacing '$' with TList.length, but
the assertion failure remains.  Marking ICE on valid despite the dollar issue.


-- 



More information about the Digitalmars-d-bugs mailing list