www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7673] New: Static variables do not allow implicit call to ctor via assignment

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

           Summary: Static variables do not allow implicit call to ctor
                    via assignment
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: andrej.mitrovich gmail.com



11:05:59 PST ---
struct Foo
{
    this(bool) { }
}

void main()
{
    Foo foo = false;  // ok
    static Foo foo = false;  // NG
}

I don't know whether the first case is actually a feature. But if it is, the
second one should be allowed as well.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 08 2012
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7673


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE



11:17:18 PST ---
Fixed by https://github.com/D-Programming-Language/dmd/pull/1213

*** This issue has been marked as a duplicate of issue 7019 ***

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