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

           Summary: [CTFE] class/struct heap allocation
           Product: D
           Version: future
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2010-04-02 14:31:22 PDT ---
struct Foo {}
class Bar {}
int spam() {
    Foo* f = new Foo();
    Bar b = new Bar();
    return 0;
}
enum int _ = spam();
void main() {}


dmd 2.042 gives:

test.d(4): Error: Cannot interpret new Foo at compile time
test.d(8): Error: cannot evaluate spam() at compile time
test.d(8): Error: cannot evaluate spam() at compile time

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

Reply via email to