Files
kotlin/compiler/testData/diagnostics/tests/callableReference/function/privateStaticAndPublicMember.kt
Denis Zharkov b5a8ffaddc Fix resolution of callable references
When there is unsuccessful (e.g invisible) result of one kind (static/non-static)
and there is a successful candidate for another kind, choose the latter one.

Note, that we have to postpone commiting trace until we choose one of the results,
otherwise errors of unsuccessful results are reported

TODO: Maybe it makes sense to report all results when all of them are
unsuccessful (NONE_APPLICABLE or something like this)

 #KT-16278 Fixed
2017-03-01 09:59:00 +03:00

11 lines
158 B
Kotlin
Vendored

// SKIP_TXT
// FILE: A.java
class A {
private static void foo() {}
public String foo(int x) {}
}
// FILE: main.kt
fun main() {
(A::foo)(A(), 1)
}