Files
kotlin/compiler/testData/diagnostics/tests/resolve/invoke/wrongInvokeExtension.kt
Stanislav Erokhin 298a075381 Minor. removed functions which declared in Standard.kt from diagnostic testdata.
Removed declaration for functions: TODO, run, with, apply, let.
2016-01-25 19:13:31 +03:00

19 lines
301 B
Kotlin
Vendored

class B
class A {
operator fun B.invoke() {}
}
val B.a: () -> Int get() = { 5 }
fun test(a: A, b: B) {
val <!UNUSED_VARIABLE!>x<!>: Int = b.a()
b.<!FUNCTION_EXPECTED!>(a)<!>()
with(b) {
val <!UNUSED_VARIABLE!>y<!>: Int = a()
<!FUNCTION_EXPECTED!>(a)<!>()
}
}