cts
cts copied to clipboard
Add tests for dynamic index of abstract numeric composite
Fuzzers found an interesting edge case that should be tested:
const v = vec2(1, 2); // vec2 of abstract-int
const m = mat2x2(1.0, 2.0, 3.0, 4.0); // vec2 of abstract-float
var i = 1i; // A runtime (non-constant expression) i32
var a = v[i];
var b = m[i];
See https://github.com/gpuweb/gpuweb/issues/3210 for why this is non-trivial.
Will also need to test for array(1,2,3) when this is spec'd.