module main; import t_def; class C{ mixin T!(); } void main(){ C c = new C(); c.func(); } -- module t_def; template T() { int[] arr; public void func() { arr[1] = 42; } } -- run main.exe Error: ArrayBoundsError main.d(8) should be t_def.d(8)
This has been fixed in git head.