struct S { int a; } struct T { real a=2; } T t; S s = t; // no compile-time or runtime error std.stdio.writeln(s.a); // -> 0 Probably this issue is due to excess-optimization. The issue is highly critical because it leave a kind of difficult-to-find problem in the compiled binary. Besides, strong-typed enum work well. enum E { a } enum F { a } E e = F.a; // of course compile-time error! P.S. Is this a duplicate of another reported issue?
*** This issue has been marked as a duplicate of issue 3259 ***