Files
kotlin/compiler/testData/diagnostics/tests/resolve/invoke/implicitInvoke.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

34 lines
353 B
Kotlin
Vendored

class B
class A {
operator fun B.invoke() = 4
}
class X {
operator fun invoke() = 3
}
fun test(a: A, b: B) {
with (a) {
b()
(b)()
}
X()()
val x = X()
x()
(x)()
}
fun test(c: () -> String, e: Int.() -> String) {
c()
(c)()
3.e()
3.(e)()
with(3) {
e()
(e)()
}
}