[FIR] Move type parameter scope above member and static scopes in tower

This fixes a false positive TYPE_PARAMETER_IS_NOT_AN_EXPRESSION when
a type parameter and some member, static or companion declaration have
the same name and referred to inside a class.

#KT-58028 Fixed
This commit is contained in:
Kirill Rakhman
2023-04-27 12:55:58 +02:00
committed by Space Team
parent 7958a9debd
commit bd9f36ad01
9 changed files with 140 additions and 25 deletions
@@ -26478,6 +26478,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/resolve/capturedTypesInLambdaParameter.kt");
}
@Test
@TestMetadata("companionPropertyAndTypeParameter.kt")
public void testCompanionPropertyAndTypeParameter() throws Exception {
runTest("compiler/testData/diagnostics/tests/resolve/companionPropertyAndTypeParameter.kt");
}
@Test
@TestMetadata("constructorVsCompanion.kt")
public void testConstructorVsCompanion() throws Exception {
@@ -26478,6 +26478,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/resolve/capturedTypesInLambdaParameter.kt");
}
@Test
@TestMetadata("companionPropertyAndTypeParameter.kt")
public void testCompanionPropertyAndTypeParameter() throws Exception {
runTest("compiler/testData/diagnostics/tests/resolve/companionPropertyAndTypeParameter.kt");
}
@Test
@TestMetadata("constructorVsCompanion.kt")
public void testConstructorVsCompanion() throws Exception {