www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7066] New: You can redefine .init and .stringof without error

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7066

           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
        AssignedTo: nobody puremagic.com
        ReportedBy: peter.alexander.au gmail.com



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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 04 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7066


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |spec
                 CC|                            |bugzilla digitalmars.com
           Severity|normal                      |enhancement



01:11:11 PST ---
They're actually supposed to be overridable at the moment. I had thought there
might be a use for this, but so far none have materialized.

But to change it is an enhancement request.

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