[FIR2IR] Lookup for nested classes in scope in Fir2IrLazyClass
^KT-55269 Fixed
This commit is contained in:
committed by
Space Team
parent
866150a2e0
commit
a86bc425e5
Generated
+6
@@ -3006,6 +3006,12 @@ public class IrTextTestGenerated extends AbstractIrTextTest {
|
||||
runTest("compiler/testData/ir/irText/stubs/javaNestedClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaNestedClassesInHierarchy.kt")
|
||||
public void testJavaNestedClassesInHierarchy() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/stubs/javaNestedClassesInHierarchy.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaStaticMethod.kt")
|
||||
public void testJavaStaticMethod() throws Exception {
|
||||
|
||||
+10
-6
@@ -79,12 +79,16 @@ class IrTextDumpHandler(testServices: TestServices) : AbstractIrHandler(testServ
|
||||
if (externalClassIds.isEmpty()) return
|
||||
|
||||
val baseFile = testServices.moduleStructure.originalTestDataFiles.first()
|
||||
for (externalClassId in externalClassIds) {
|
||||
val classDump = info.irPluginContext.findExternalClass(externalClassId).dump()
|
||||
val suffix = ".__${externalClassId.replace("/", ".")}"
|
||||
val expectedFile = baseFile.withSuffixAndExtension(suffix, module.getDumpExtension(ignoreFirIdentical = true))
|
||||
assertions.assertEqualsToFile(expectedFile, classDump)
|
||||
}
|
||||
assertions.assertAll(
|
||||
externalClassIds.map { externalClassId ->
|
||||
{
|
||||
val classDump = info.irPluginContext.findExternalClass(externalClassId).dump()
|
||||
val suffix = ".__${externalClassId.replace("/", ".")}"
|
||||
val expectedFile = baseFile.withSuffixAndExtension(suffix, module.getDumpExtension(ignoreFirIdentical = true))
|
||||
assertions.assertEqualsToFile(expectedFile, classDump)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
private fun IrPluginContext.findExternalClass(externalClassId: String): IrClass {
|
||||
|
||||
Reference in New Issue
Block a user