From 5409a51ce9531afecbd1f7830989f4e27ee1c38d Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Tue, 19 Dec 2023 17:55:22 +0100 Subject: [PATCH] K2: remove a workaround for suspend functions implementation status This commit breaks two diagnostic tests: - testSuspendJavaImplementationFromDifferentClass - testSuspendJavaOverrides Related to KT-59818 #KT-63233 Fixed --- .../jetbrains/kotlin/fir/analysis/checkers/FirHelpers.kt | 4 ---- .../coroutines/suspendNotImplemented.fir.kt | 7 ------- .../testsWithStdLib/coroutines/suspendNotImplemented.kt | 1 + 3 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.fir.kt diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirHelpers.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirHelpers.kt index 6b382e5cf09..ba05cce527d 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirHelpers.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirHelpers.kt @@ -408,10 +408,6 @@ fun FirCallableSymbol<*>.getImplementationStatus( ) { return ImplementationStatus.INHERITED_OR_SYNTHESIZED } - // TODO, KT-59818: suspend function overridden by a Java class in the middle is not properly regarded as an override - if (isSuspend) { - return ImplementationStatus.INHERITED_OR_SYNTHESIZED - } } is FirFieldSymbol -> if (symbol.isJavaOrEnhancement) return ImplementationStatus.CANNOT_BE_IMPLEMENTED } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.fir.kt deleted file mode 100644 index 9aeff89bfb1..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.fir.kt +++ /dev/null @@ -1,7 +0,0 @@ -// ISSUE: KT-63233, KT-59818 - -interface A { - suspend fun foo() -} - -class B : A diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.kt index f8813f8565f..0eb3050bea3 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendNotImplemented.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // ISSUE: KT-63233, KT-59818 interface A {