[Test] Add test for KT-54645
This commit is contained in:
committed by
Space Team
parent
7e323f8ac6
commit
d54503e66c
+6
@@ -7142,6 +7142,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
public void testInlineFunctionCompanionPropertyAccess() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/companion/inlineFunctionCompanionPropertyAccess.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt54645.kt")
|
||||
public void testKt54645() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/companion/kt54645.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// ISSUE: KT-54645
|
||||
|
||||
abstract class Base {
|
||||
open class Nested
|
||||
}
|
||||
|
||||
sealed class Derived : Base() {
|
||||
open class Nested
|
||||
}
|
||||
|
||||
class Impl() : Derived() {
|
||||
companion object : Nested()
|
||||
}
|
||||
|
||||
fun takeDerivedNested(x: Derived.Nested) {}
|
||||
|
||||
fun box(): String {
|
||||
takeDerivedNested(Impl)
|
||||
return "OK"
|
||||
}
|
||||
+6
@@ -7142,6 +7142,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
public void testInlineFunctionCompanionPropertyAccess() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/companion/inlineFunctionCompanionPropertyAccess.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt54645.kt")
|
||||
public void testKt54645() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/companion/kt54645.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
Reference in New Issue
Block a user