Drew Hamilton
12/14/2023, 10:16 PMirIs(argument, type)
, then I can subsequently make an irCall
treating argument
as type
– I guess the compiler is generating a smartcast for me.
But for the wasmJs
target, I need to generate the smartcast manually with irImplicitCast(argument, type)
or I’ll get a compile error when trying to use argument
as type
.
Is either of these behaviors a bug that I should file on YouTrack?Pavel Kunyavskiy [JB]
12/15/2023, 9:00 AMDrew Hamilton
12/15/2023, 5:03 PMirImplicitCast
is more correct.
Also it can sometimes work not exactly as you expected.By “it” here, you mean compiling slightly inconsistent IR as I was before?
Pavel Kunyavskiy [JB]
12/15/2023, 5:14 PMDrew Hamilton
12/15/2023, 5:36 PM