diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/BuiltInsLowering.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/BuiltInsLowering.kt index 1a3d4fb69c0..0e980f4c4eb 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/BuiltInsLowering.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/BuiltInsLowering.kt @@ -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) } diff --git a/compiler/testData/codegen/box/function/eqeq.kt b/compiler/testData/codegen/box/function/eqeq.kt index da9a1de5852..086f3ac7b1d 100644 --- a/compiler/testData/codegen/box/function/eqeq.kt +++ b/compiler/testData/codegen/box/function/eqeq.kt @@ -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.*