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
|
||||
}
|
||||
Reference in New Issue
Block a user