http://d.puremagic.com/issues/show_bug.cgi?id=6928
Summary: alias this, immutable and common type fail in presence of fields with indirections Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: timon.g...@gmx.ch --- Comment #0 from timon.g...@gmx.ch 2011-11-10 08:24:28 PST --- T x; struct S{ T get() const {return x;} alias get this; } struct T{int* p;} // p is necessary. immutable(S) s; immutable(T) t; static assert(is(typeof(1? s:t))); // ok. static assert(is(typeof(1? t:s))); // ok. static assert(is(typeof(1? s:t)==typeof(1? t:s))); // fail. void main(){ auto x = 1? t:s; // ok. auto y = 1? s:t; // compile error. } The code should compile fine. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------