298a075381
Removed declaration for functions: TODO, run, with, apply, let.
19 lines
333 B
Kotlin
Vendored
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>() }
|
|
}
|
|
}
|
|
}
|