https://issues.dlang.org/show_bug.cgi?id=20443
Daniel X <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Daniel X <[email protected]> --- further reduced, thanks to Paul Backus (author of 'sumtype' who generously looked into this issue for us) --- struct SumType(T) { import std.traits: isCopyable; static if (!isCopyable!T) @disable this(this); } struct CallbackType1 { bool[Class1] func; // changing to Class1[] compiles OK } // moving Class1 above CallbackType1 compiles OK class Class1 { SumType!CallbackType1 _callback; this(SumType!CallbackType1 callback) { // commenting out this ctor compiles OK _callback = callback; } } --
