[Issue 7021] New: Structs with disabled default constructors can be constructed without calling a constructor.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 27 13:24:27 PST 2011


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

           Summary: Structs with disabled default constructors can be
                    constructed without calling a constructor.
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: simen.kjaras at gmail.com


--- Comment #0 from Simen Kjaeraas <simen.kjaras at gmail.com> 2011-11-27 13:23:25 PST ---
struct Foo {
    @disable this();
}

void main() {
    auto foo = Foo();
}

The above code compiles and runs just fine on dmd 2.056.

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