[Wasm] Fix equality on Nothing type

Fixed #KT-66104
This commit is contained in:
Igor Yakovlev
2024-03-07 11:26:47 +01:00
committed by Space Team
parent 7c16528560
commit b839e2680e
2 changed files with 1 additions and 3 deletions
@@ -97,7 +97,7 @@ class BuiltInsLowering(val context: WasmBackendContext) : FileLoweringPass {
}
// For eqeqSymbol use overridden `Any.equals(Any?)` if there is any.
if (call.symbol === irBuiltins.eqeqSymbol && !lhsType.isNullable()) {
if (call.symbol === irBuiltins.eqeqSymbol && !lhsType.isNullable() && !lhsType.isNothing()) {
return irCall(call, lhsType.findEqualsMethod().symbol, argumentsAsReceivers = true)
}