Files
Yan Zhulanow 0147d725fb [Analysis API] Provide type mapping for callable references
Strictly speaking, callable references are not calls. However, type
arguments are still inferred for references, and 'KtCall' is the only
place in Analysis API that exposes call-substituted types.

^KT-66485 Fixed
2024-03-14 06:10:31 +00:00

15 lines
299 B
Kotlin
Vendored

interface Foo {
fun Bar.foo(a: Int)
}
interface Bar
fun test(foo: Foo) {
with(foo) {
// 'foo' is a member and an extension at the same time.
// References to such elements are prohibited.
consume(<expr>Bar::foo</expr>)
}
}
fun consume(f: (Bar, Int) -> Unit) {}