Fix output for type cast when checking fails (#238)
Fix output for type cast when checking fails (#238)

There were some cases where we would try to emit an `ErrorType` to the output HLSL, which obviously isn't allowed. This change tries to avoid emitting error types, and instead use the original expression when it is available.

I tried adding a test case for the change, but I can't convince Slang to output matching line numbers for the error message; it seems like more work is needed on that front.
csyonghe/slang,shader-slang/slang,shader-slang/slang,shader-slang/slang,csyonghe/slang,csyonghe/slang