void main() { auto _ = [1][] ^^ 2; } DMD 2.055beta output: [1][] ^^ 2 Internal error: e2ir.c 683
Ahh, looks like it is leaking PowExp::toElem - didn't notice this as I have it implemented in GDC. Best thing to immediately do is implement the missing methods as stubs (I was intending to move onto backend support and add constant folding/ctfe support for ^^ operations. :)
Can you see if you can break things in any way after this commit? https://github.com/D-Programming-Language/dmd/pull/344 Regards Iain
(In reply to comment #2) > Regards > Iain Thank you for your work.
https://github.com/D-Programming-Language/dmd/pull/344/files Finalised feature and added test cases.
(In reply to comment #2) > Can you see if you can break things in any way after this commit? Now this code doesn't crash DMD: void main() { auto _ = [1][] ^^ 2; } But this code doesn't work yet: import std.math; void main() { int[5] a, b; b[] = a[] ^^ 2; } It gives: ...\dmd2\src\phobos\std\math.d(58): Error: module math is in file 'core\stdc\math.d' which cannot be read
Sorry, my Phobos was badly set. Things work now.
https://github.com/D-Programming-Language/dmd/commit/aca624ff20e1cf39d9ca30800f5bc64765974082