Drop traits with required classes

#KT-4771 Rejected
This commit is contained in:
Alexander Udalov
2015-06-16 23:40:25 +03:00
parent dc909ba1d4
commit 1a3209e1dc
63 changed files with 49 additions and 1109 deletions
@@ -1,26 +0,0 @@
// Changed when traits were introduced. May not make sense any more
open class Base() {
public var v: Int = 0
}
open class Left() : Base() {
}
trait Right : Base {
}
class D() : Left(), Right
fun vl(l: Left): Int = l.v
fun vr(r: Right): Int = r.v
fun box(): String {
val d = D()
d.v = 42
if (d.v != 42) return "Fail #1"
if (vl(d) != 42) return "Fail #2"
if (vr(d) != 42) return "Fail #3"
return "OK"
}