178bb900b4
#KT-10754 Fixed
17 lines
316 B
Plaintext
Vendored
17 lines
316 B
Plaintext
Vendored
fun Int.foo() {}
|
|
|
|
open class A {
|
|
~A.foo~fun foo(i: Int) {}
|
|
}
|
|
open class B {}
|
|
|
|
fun test(a: A, b: B) {
|
|
with (a) {
|
|
with (b) {
|
|
// resolved to A.foo with error: CONSTANT_EXPECTED_TYPE_MISMATCH
|
|
foo(1.0)
|
|
}
|
|
}
|
|
}
|
|
|
|
fun <T, R> with(receiver: T, f: T.() -> R) : R = receiver.f() |