Following code compilation crashes dmd. import std.typecons; void main() { Nullable!(int, 0) ni; ni = ni; } This is alias this issue that fallbacks to template member function. Reduced test case: struct S(T) { void opAssign()(T value) {} } struct X(T) { private T val; @property ref inout(T) get()() inout { return val; } alias get this; } void test() { S!(int) s; X!int x; s = x; }
https://github.com/D-Programming-Language/dmd/pull/762
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/9d24a9916f573bb78504ef9a642fd7747f282393 fix Issue 7580 - Identity assignment of Nullable crashes dmd https://github.com/D-Programming-Language/dmd/commit/a03216f62665b8e04d2d67dc1b52dc3ec8826163 Merge pull request #762 from 9rnsr/fix7580 Issue 7580 - Identity assignment of Nullable crashes dmd
*** Issue 7588 has been marked as a duplicate of this issue. ***