[FIR] KT-57195: Don't approximate ft when checking override return types
Why does this check even exist? K1 doesn't do it. ^KT-57195 Fixed
This commit is contained in:
committed by
Space Team
parent
b385d787cc
commit
5505fd207e
+12
@@ -657,6 +657,18 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/OverrideFunctionWithParamDefaultValue.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overrideNotNull_Fail.kt")
|
||||
public void testOverrideNotNull_Fail() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/overrideNotNull_Fail.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overrideNotNull_Ok.kt")
|
||||
public void testOverrideNotNull_Ok() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/overrideNotNull_Ok.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("OverridenFunctionAndSpecifiedTypeParameter.kt")
|
||||
public void testOverridenFunctionAndSpecifiedTypeParameter() throws Exception {
|
||||
|
||||
+12
@@ -657,6 +657,18 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/OverrideFunctionWithParamDefaultValue.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overrideNotNull_Fail.kt")
|
||||
public void testOverrideNotNull_Fail() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/overrideNotNull_Fail.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overrideNotNull_Ok.kt")
|
||||
public void testOverrideNotNull_Ok() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/overrideNotNull_Ok.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("OverridenFunctionAndSpecifiedTypeParameter.kt")
|
||||
public void testOverridenFunctionAndSpecifiedTypeParameter() throws Exception {
|
||||
|
||||
+1
-1
@@ -213,7 +213,7 @@ object FirOverrideChecker : FirClassChecker() {
|
||||
return null
|
||||
}
|
||||
|
||||
val bounds = overriddenSymbols.map { context.returnTypeCalculator.tryCalculateReturnType(it).coneType.upperBoundIfFlexible() }
|
||||
val bounds = overriddenSymbols.map { context.returnTypeCalculator.tryCalculateReturnType(it).coneType }
|
||||
|
||||
for (it in bounds.indices) {
|
||||
val overriddenDeclaration = overriddenSymbols[it]
|
||||
|
||||
Reference in New Issue
Block a user