https://issues.dlang.org/show_bug.cgi?id=14406
--- Comment #2 from Kenji Hara <[email protected]> --- This is an accepts-invalid bug. Slightly reduced: class Foo {} string str_mixin(T)() { static if (T.tupleof.length) {} // Fix instance size of T (== Frop) return "Bar bar_obj; static class Bar { Foo foo; }"; } class Frop { mixin(str_mixin!(typeof(this))); // adding more field after Frop fields fixed. } void main() { Frop simple = new Frop; } In str_mixin() function, testing Frop.tupleof fix the class fields and instance size. Therefore adding one more field `bar_obj` should be rejected because it will change the Frop instance size. --
