FIR: Add test for type resolution when referenced nested class from supertypes

This commit is contained in:
Denis.Zharkov
2021-02-01 14:31:19 +03:00
parent c51798d46f
commit 8712772a5f
3 changed files with 34 additions and 0 deletions
@@ -34746,6 +34746,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
public void testSamOverloadsWithKtFunctionWithoutRefinedSams() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt");
}
@Test
@TestMetadata("sameNameClassesFromSupertypes.kt")
public void testSameNameClassesFromSupertypes() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/sameNameClassesFromSupertypes.kt");
}
}
@Nested
@@ -0,0 +1,22 @@
// FIR_IDENTICAL
// SKIP_TXT
abstract class MostBase {
inner class Inner(
val bad: String,
)
}
abstract class Base : MostBase() {
inner class Inner(
val name: String?,
val res: Int,
)
}
class A : Base() {
fun foo(l: List<Inner>) {
val m = l.groupBy(Inner::name)
m[""]!![0].res
}
}
@@ -34842,6 +34842,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
public void testSamOverloadsWithKtFunctionWithoutRefinedSams() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt");
}
@Test
@TestMetadata("sameNameClassesFromSupertypes.kt")
public void testSameNameClassesFromSupertypes() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/sameNameClassesFromSupertypes.kt");
}
}
@Nested