Named vector component access would not fold at compile time. #1574

This commit is contained in:
Christoffer Lerno
2024-10-26 13:22:35 +02:00
parent 83f8d24892
commit b187d5a3fc
4 changed files with 19 additions and 8 deletions

View File

@@ -9,3 +9,14 @@ fn void! swizzle_test()
}
fn int main()
{
int[<2>] $test = {3, 3};
int[<2>] $test2 = {4, 4};
$if ($test2.x != $test.x):
y++; // #error: did you spell it
$endif
return 0;
}