[Issue 4022] New: [CTFE] AA get

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 28 06:40:19 PDT 2010


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

           Summary: [CTFE] AA get
           Product: D
           Version: future
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2010-03-28 06:40:18 PDT ---
This program, compiled with dmd 2.042:


int foo() {
    int[int] aa = [1: 1];
    int r = aa.get(1, 1000);
    return 1;
}
enum _ = foo();
void main() {}



Generates the errors:

...\dmd\src\druntime\import\object.di(366): Error: Cannot interpret key in
*cast(int[int]*)&this.p at compile time
test.d(5): Error: cannot evaluate aa.get(1,delegate int()

{

return 1000;

}

) at compile time
test.d(8): Error: cannot evaluate foo() at compile time
test.d(8): Error: cannot evaluate foo() at compile time

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list