Test for obsolete KT-3579: UsupportedOperationException while trying to compile recursive trait

#KT-3579 Obsolete
This commit is contained in:
Michael Bogdanov
2015-05-15 17:23:10 +03:00
parent eb8d2d695c
commit f1eb68c55a
3 changed files with 30 additions and 0 deletions
@@ -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
}