[Issue 1129] New: ICE, expression.c line 6246,	accessing element of a tuple built from a nonexistent array element
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Apr 12 04:14:01 PDT 2007
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=1129
           Summary: ICE, expression.c line 6246, accessing element of a
                    tuple built from a nonexistent array element
           Product: D
           Version: 1.011
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: deewiant at gmail.com
template Foo(T...) {
        typeof(T[0]) x;
}
alias Foo!(""[$]) foo; // can't use e.g. [][0] because it's detected as out of
bounds
--
Output of the above:
asdf.d(5): Error: expression [][__dollar] is not a valid template value
argument
Assertion failure: 'e1->type' on line 6246 in file 'expression.c'
abnormal program termination
--
Using "" in place of [] as an empty array instead generates the rather
incorrect error message:
asdf.d(5): Error: string index 0 is out of bounds [0 .. 43867541830893568]
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list