[FIR] Fully expand the bounds of type parameters for canBeNull check

This is required because a not-null bound `Foo` can resolve to a
`typealias Foo = Bar?` in which case we must return true.

#KT-64645 Fixed
This commit is contained in:
Kirill Rakhman
2024-01-02 15:45:41 +01:00
committed by Space Team
parent 438b2dd164
commit 1018ff280e
23 changed files with 100 additions and 54 deletions
@@ -32905,6 +32905,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/insideCall.kt");
}
@Test
@TestMetadata("kt64645.kt")
public void testKt64645() throws Exception {
runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/kt64645.kt");
}
@Test
@TestMetadata("smartCastOfNullableExpressionWithExpectedType.kt")
public void testSmartCastOfNullableExpressionWithExpectedType() throws Exception {
@@ -33025,6 +33025,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/insideCall.kt");
}
@Test
@TestMetadata("kt64645.kt")
public void testKt64645() throws Exception {
runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/kt64645.kt");
}
@Test
@TestMetadata("smartCastOfNullableExpressionWithExpectedType.kt")
public void testSmartCastOfNullableExpressionWithExpectedType() throws Exception {