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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 24 09:09:36 PDT 2012


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



--- Comment #18 from Kenji Hara <k.hara.pg at gmail.com> 2012-09-24 09:10:23 PDT ---
(In reply to comment #16)
> Then I _definitely_ think that S() and S.init should always be the same for
> structs as long as static opCall has not been declared

I cannot agree with your this opinion.

If S() is identical with S.init, default construction of nested struct will
cause Access Violation in anywhere. It means that s1 would be broken at the
example in comment#13. It is terrible language semantics.

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