I think that we should generalize the power of casts. Specifically, make it possible to say: void foo<|int>() { ... } void foo<|double>() { ... } Then when you call foo<int>(), you get the first one, and if you call foo<double>(), you get the second one. If you call foo<bool>(), you get an error. In general, the syntax would be: void foo<typeVariables | typeParameters>() So you could say: void foo<T, U:numeric | vec4<T>, U>() { ... } You'd get that function if you called: foo<vec4<int>, double>();
We've removed generics from the language, so this bug doesn't make much sense any more.
Migrated to https://github.com/gpuweb/WHLSL/issues/151