Files
kotlin-fork/compiler/testData/diagnostics/tests/resolve/priority/invokeExtensionVsOther.kt
T
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
333 B
Kotlin
Vendored

// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
class A
class B {
fun foo() = this
}
fun test(foo: A.() -> Int) {
with(A()) {
foo() checkType { _<Int>() }
with(B()) {
foo() checkType { _<B>() }
this.foo() checkType { _<B>() }
}
}
}