Test for obsolete KT-3579: UsupportedOperationException while trying to compile recursive trait
#KT-3579 Obsolete
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
open class Persistent(val p: String)
|
||||
trait Hierarchy<T: Persistent > where T : Hierarchy<T>
|
||||
|
||||
class Location(): Persistent("OK"), Hierarchy<Location>
|
||||
|
||||
fun box(): String {
|
||||
return Location().p
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
trait First
|
||||
trait Some<T: First> where T : Some<T>
|
||||
|
||||
val a: Some<*>? = null
|
||||
|
||||
class MClass(val p: String): First, Some<MClass>
|
||||
|
||||
fun box(): String {
|
||||
return MClass("OK").p
|
||||
}
|
||||
+12
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user