de50f8aef3
Here we introduce ONLY_IMPLICIT_RECEIVER tower level to support extension lambda calls on local variables, and soften extension receiver checks to make such extensions visible & applicable. Also here we try to map arguments twice for functional types
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>() }
|
|
}
|
|
}
|
|
}
|