diff --git a/compiler/testData/codegen/box/traits/kt3579.kt b/compiler/testData/codegen/box/traits/kt3579.kt new file mode 100644 index 00000000000..5f1d151d85e --- /dev/null +++ b/compiler/testData/codegen/box/traits/kt3579.kt @@ -0,0 +1,8 @@ +open class Persistent(val p: String) +trait Hierarchy where T : Hierarchy + +class Location(): Persistent("OK"), Hierarchy + +fun box(): String { + return Location().p +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/traits/kt3579_2.kt b/compiler/testData/codegen/box/traits/kt3579_2.kt new file mode 100644 index 00000000000..a03d0c46823 --- /dev/null +++ b/compiler/testData/codegen/box/traits/kt3579_2.kt @@ -0,0 +1,10 @@ +trait First +trait Some where T : Some + +val a: Some<*>? = null + +class MClass(val p: String): First, Some + +fun box(): String { + return MClass("OK").p +} diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxCodegenTestGenerated.java index bacaa81cd32..ec7d64c6875 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxCodegenTestGenerated.java @@ -6859,6 +6859,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { doTest(fileName); } + @TestMetadata("kt3579.kt") + public void testKt3579() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3579.kt"); + doTest(fileName); + } + + @TestMetadata("kt3579_2.kt") + public void testKt3579_2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3579_2.kt"); + doTest(fileName); + } + @TestMetadata("kt5495.kt") public void testKt5495() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt5495.kt");