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