[FIR] Only inherit class type parameters if inner class

Nested classes which are not inner class should not be able to access
type parameters of the outer class. Make sure access is not available
when resolving super types.

#KT-54748 Fixed
This commit is contained in:
Brian Norman
2023-05-26 09:19:09 -05:00
committed by Space Team
parent dfae730d0f
commit e10a9263d0
15 changed files with 79 additions and 47 deletions
@@ -19418,6 +19418,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/inner/nestedClassNotAllowed_before.kt");
}
@Test
@TestMetadata("nestedClassTypeParameterNameCollision.kt")
public void testNestedClassTypeParameterNameCollision() throws Exception {
runTest("compiler/testData/diagnostics/tests/inner/nestedClassTypeParameterNameCollision.kt");
}
@Test
@TestMetadata("nestedObject.kt")
public void testNestedObject() throws Exception {
@@ -19418,6 +19418,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/inner/nestedClassNotAllowed_before.kt");
}
@Test
@TestMetadata("nestedClassTypeParameterNameCollision.kt")
public void testNestedClassTypeParameterNameCollision() throws Exception {
runTest("compiler/testData/diagnostics/tests/inner/nestedClassTypeParameterNameCollision.kt");
}
@Test
@TestMetadata("nestedObject.kt")
public void testNestedObject() throws Exception {