[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)
}
-2
View File
@@ -2,8 +2,6 @@
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
// KT-66104: Internal error in file lowering: java.util.NoSuchElementException: Sequence contains no element matching the predicate.
// IGNORE_BACKEND: WASM
// WITH_STDLIB
import kotlin.test.*