Fix a bug in the "operator cache" (#1784)
Fix a bug in the "operator cache" (#1784)

In order to speed up compilation, the semantic checking step uses a cache for overload resolution in the case of an operator being applied to operations of basic scalar types and vectors/matrices thereof.

The logic for construct keys for that cache was defensive against the case of, e.g., `vector<int,N>` where the element count `N` of the vector was not a literal value but a generic parameter. For some reason it did not have equivalent safeguards for a case like `vector<T,2>` where the element type was not a basic type, and it would instead assume all vector/matrix types had basic types as their element type.

This change fixes the logic to make it properly defensive against this case.

Co-authored-by: jsmall-nvidia <ba36e50ee2a280bd63d65c073bf01958e3433531@nvidia.com>
csyonghe/slang,shader-slang/slang,csyonghe/slang,shader-slang/slang,csyonghe/slang,shader-slang/slang