Files
kotlin-fork/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2226.kt
T
Andrey Breslav 3d8d92c7d3 JetDiagnosticsTest migrated to TestGenerator
- test data files renamed from *.jet to *.kt
2012-07-10 14:48:11 +04:00

15 lines
232 B
Kotlin

//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()
}