https://issues.dlang.org/show_bug.cgi?id=22579
Paul Backus <snarwin+bugzi...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |snarwin+bugzi...@gmail.com --- Comment #1 from Paul Backus <snarwin+bugzi...@gmail.com> --- Here's a full example that reproduces the error: --- issue22579.d template canon(string v) { unittest { class A { this(int n) {} } class B {} Object[] arr = [new A(1), new B(), null]; } } --- main.d import issue22579; alias _ = canon!""; extern(C) int main() { return 0; } --- Compile with the following command: --- dmd -betterC -unittest main.d issue22579.d --- run.dlang.io link: https://run.dlang.io/is/VtkBvu --