On Thu Sep 7 16:54:55 2023 +0000, Nikolay Sivov wrote:
It relies on cast failing. On Windows it works as long as conversion works. Same for last argument, that does not have to be strictly scalar.
Converting to the type of the first argument is unusual for intrinsics, and needs tests to show it's the right behaviour. Most intrinsics take the smallest "intersection" of their argument types.
Note also that add_user_call() uses add_cast() which won't actually fail if an implicit conversion can't be performed. We may want to change that anyway; I don't think we have any code that performs an invalid cast, but we do have code that fails to print a warning on e.g. vector truncation.