76ed5453b3
Check all members for `Visibility.Unknown`, otherwise we miss them when they come from supertypes. This is the reason why the FP intellij build failed with a cryptic stacktrace instead of a human-readable diagnostic. Also, do report the diagnostic at all cases of `Visibilities.Unknown`. Turns out, there are no "simple to reason about" situations here :( Also, an interesting detail: `retrieveDirectOverriddenOf` returns an empty list for intersection overrides. But this doesn't seem to break anything... Replacing `CANNOT_INFER_VISIBILITY`'s type `KtDeclaration` with `PsiNameIdentifierOwner` and the related changes in `PositioningStrategies` were needed to prevent an exception saying that `PsiClassImpl` is not a subtype of `KtDeclaration`.
18 lines
422 B
Kotlin
Vendored
18 lines
422 B
Kotlin
Vendored
// FULL_JDK
|
|
// JVM_TARGET: 1.8
|
|
// ISSUE: KT-63243
|
|
|
|
abstract class MyMap<K : Any, V : Any> : AbstractMutableMap<K, V>()
|
|
|
|
interface II {
|
|
fun replace(key: Int, value: Int): Int? = null
|
|
}
|
|
|
|
abstract class ZI : MyMap<Int, Int>(), II
|
|
|
|
interface IS {
|
|
fun replace(key: String, value: String): String? = null
|
|
}
|
|
|
|
abstract <!CANNOT_INFER_VISIBILITY, MANY_IMPL_MEMBER_NOT_IMPLEMENTED!>class ZS<!> : MyMap<String, String>(), IS
|