[FIR] Prevent replacing UNNECESSARY_SAFE_CALL with UNEXPECTED_SAFE_CALL

UNNECESSARY_SAFE_CALL is a warning,
UNEXPECTED_SAFE_CALL is an error, thus
it's a breaking change.

Also see KT-60695.

^KT-59860 Fixed


Merge-request: KT-MR-11210
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
This commit is contained in:
Nikolay Lunyak
2023-07-25 13:16:37 +00:00
committed by Space Team
parent cd073690fa
commit 57908eba77
10 changed files with 50 additions and 7 deletions
@@ -1245,6 +1245,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/UnderscoreUsageInVariableAsFunctionCall.kt");
}
@Test
@TestMetadata("unexpectedSafeCall.kt")
public void testUnexpectedSafeCall() throws Exception {
runTest("compiler/testData/diagnostics/tests/unexpectedSafeCall.kt");
}
@Test
@TestMetadata("UnitByDefaultForFunctionTypes.kt")
public void testUnitByDefaultForFunctionTypes() throws Exception {
@@ -1245,6 +1245,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/UnderscoreUsageInVariableAsFunctionCall.kt");
}
@Test
@TestMetadata("unexpectedSafeCall.kt")
public void testUnexpectedSafeCall() throws Exception {
runTest("compiler/testData/diagnostics/tests/unexpectedSafeCall.kt");
}
@Test
@TestMetadata("UnitByDefaultForFunctionTypes.kt")
public void testUnitByDefaultForFunctionTypes() throws Exception {