Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/extensionFromExtensionInClass.kt
T
Alexander Udalov c4b4fa750c Resolve callable reference expressions
#KT-1183 In Progress
2013-04-22 17:59:31 +04:00

18 lines
322 B
Kotlin

class B
class A {
fun B.main() {
val x = ::foo
val y = ::bar
val z = ::baz
x : KExtensionFunction0<A, Unit>
y : KExtensionFunction1<A, Int, Unit>
z : KExtensionFunction0<A, String>
}
}
fun A.foo() {}
fun A.bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
fun A.baz() = "OK"