Summary: You can redefine .init and .stringof without error
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Peter Alexander <> 2011-12-04 
15:44:59 PST ---
The .init and .stringof properties of types can be redefined. A lot of code
depends on the definition of .init, so being able to change this breaks a lot
of Phobos.

class Foo
    static immutable int init;
    static immutable int stringof;

int x = Foo.init;
int y = Foo.stringof;

DMD should give an error just like it does for .sizeof, .alignof, and .mangleof

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to