https://issues.dlang.org/show_bug.cgi?id=16426
John Hall <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from John Hall <[email protected]> --- Structs have opAssign defined by default. Alias this only forwards undefined lookups. Below is a workaround. import std.stdio : writeln; struct Base{ void opAssign(T)(T x){ writeln("assigning : ",x); } } struct Derived{ Base parent; alias parent this; void opAssign(T)(T x){ parent = x; } } void main() { Base a; a = 10; //ok Derived b; b = 20; //Error } --
