Tests for not reproduced KT-1770, KT-3001 and KT-3414

#KT-3414 Can't Reproduced
 #KT-3001 Can't Reproduced
 #KT-1770 Can't Reproduced
This commit is contained in:
Mikhael Bogdanov
2013-06-18 14:46:14 +04:00
parent 79cf02ffb9
commit 86f2a6dc69
5 changed files with 61 additions and 0 deletions
@@ -0,0 +1,11 @@
trait A {
val result: String
}
class Base(override val result: String) : A
open class Derived : A by Base("OK")
class Z : Derived()
fun box() = Z().result
@@ -0,0 +1,18 @@
trait A {
fun foo(): Int
}
trait B {
fun foo(): Int
}
class Z(val a: A) : A by a, B
fun box(): String {
val s = Z(object : A {
override fun foo(): Int {
return 1;
}
});
return if (s.foo() == 1) "OK" else "fail"
}