KT-2226 Parameter used as delegation by object marked as unused

#KT-2226 fixed
This commit is contained in:
Svetlana Isakova
2012-06-08 18:24:26 +04:00
parent a070f62317
commit 9ede882cd5
4 changed files with 88 additions and 4 deletions
@@ -0,0 +1,15 @@
//KT-2226 Parameter used as delegation by object marked as unused
package a
trait A {
fun foo() : Int
}
class B : A {
override fun foo() = 10
}
fun foo(b: B) : Int {
val o = object : A by b {
}
return o.foo()
}