DMD CTFE Bug?
David
d at dav1d.de
Fri Aug 17 09:27:52 PDT 2012
I have this code: http://dpaste.dzfl.pl/dbe2a07f
It works perfectly fine, except for `t!(2, 10)` and `t!(1, 10)`:
// Expected:
[Vertex(-0.5, 0.5, 0.5, 0, 1, 0, 2, 10, 2, 10, 0, 0), Vertex(0.5, 0.5,
0.5, 0, 1, 0, 3, 10, 3, 10, 0, 0), Vertex(0.5, 0.5, -0.5, 0, 1, 0, 3,
9, 3, 9, 0, 0),
Vertex(-0.5, 0.5, 0.5, 0, 1, 0, 2, 10, 2, 10, 0, 0), Vertex(0.5, 0.5,
-0.5, 0, 1, 0, 3, 9, 3, 9, 0, 0), Vertex(-0.5, 0.5, -0.5, 0, 1, 0, 2, 9,
2, 9, 0, 0)]
// Actual result:
[Vertex(-0.5, 0.5, 0.5, 0, 1, 0, 2, 10, 2, 10, 0, 0), Vertex(0.5, 0.5,
0.5, 0, 1, 0, 3, 10, 3, 10, 0, 0), Vertex(0.5, -0.5, 0.5, 0, -1, 0, 6,
3, 6, 3, 0, 0),
Vertex(-0.5, 0.5, 0.5, 0, 1, 0, 2, 10, 2, 10, 0, 0), Vertex(0.5, 0.5,
-0.5, 0, 1, 0, 3, 9, 3, 9, 0, 0), Vertex(-0.5, 0.5, -0.5, 0, 1, 0, 2, 9,
2, 9, 0, 0)]
If I change `enum` in line 117 to `auto` it produces the expected result.
Any ideas why this happens?
(Btw. I wasn't able produce a smaller testcase)
More information about the Digitalmars-d-learn
mailing list