http://d.puremagic.com/issues/show_bug.cgi?id=10012
Kenji Hara <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid --- Comment #3 from Kenji Hara <[email protected]> 2013-05-04 00:43:03 PDT --- (In reply to comment #2) > Sorry, I was blind while preparing the test case. This is the correct one: > > --- > struct S { string str; } > class Test { S _s; this(S s) pure { _s = s; } } > > void main() > { > auto test2 = new shared Test(S()); > auto test3 = new immutable Test(S()); > } > --- > > So POD indeed works right, but immutable (and shared) references are seemingly > disallowed. This is current dmd implementation limitation. In complex cases dmd cannot detect that the constructor generates unique object. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
