https://issues.dlang.org/show_bug.cgi?id=23905 --- Comment #1 from Paul Backus <snarwin+bugzilla at gmail.com> --- Reduced: --- struct SumType(T) { T storage; bool opEquals(Rhs)(Rhs rhs) if (is(typeof(Rhs.init))) { } } enum Foo; void main(){ SumType!Foo data = Foo.init; } --- --