cts icon indicating copy to clipboard operation
cts copied to clipboard

Add tests for dynamic index of abstract numeric composite

Open ben-clayton opened this issue 3 years ago • 1 comments

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.

ben-clayton avatar Jul 20 '22 17:07 ben-clayton

Will also need to test for array(1,2,3) when this is spec'd.

ben-clayton avatar Jul 20 '22 17:07 ben-clayton