e187c9272d
`INVISIBLE_REFERENCE` may be reported due to CandidateApplicability via a ConeDiagnostic, or in a checker. The former leads to `FirErrorResolvedQualifier`, so the checker is not called. This makes little sense, because CandidateApplicability may result in `NO_COMPANION_OBJECT`, which would prevent other more meaningful diagnostics from being reported (like `API_NOT_AVAILABLE`). If we run checkers for `FirErrorResolvedQualifier` we may get duplicate `INVISIBLE_REFERENCE`. The change in the checker prevents it.
19 lines
379 B
Kotlin
Vendored
19 lines
379 B
Kotlin
Vendored
// KT-4149 static members of Java private nested class are accessible from Kotlin
|
|
|
|
// FILE: javaPackage/Foo.java
|
|
|
|
package javaPackage;
|
|
|
|
public class Foo {
|
|
private static class Bar {
|
|
public static void doSmth() {
|
|
}
|
|
}
|
|
}
|
|
|
|
// FILE: 1.kt
|
|
|
|
fun main() {
|
|
javaPackage.Foo.<!INVISIBLE_REFERENCE, NO_COMPANION_OBJECT!>Bar<!>.<!INVISIBLE_REFERENCE!>doSmth<!>()
|
|
}
|