[Issue 3557] Pure function cannot call struct constructor

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 11 13:40:34 PST 2010


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



--- Comment #3 from Tomasz Sowiński <tomeksowi at gmail.com> 2010-01-11 13:40:33 PST ---
(In reply to comment #2)
> This compiles. Should it?

I'm now confident it shouldn't:

string global;
class A {
    float f;
    this (float f) {    // NOT pure
        this.f = f;
        global = "BUGABUGA!";
    }
    static pure A stworz(float f) {
        return new A(f);
    }
}

-- 
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