Files
kotlin-fork/compiler/testData/diagnostics/tests/override/kt4785.kt
T
Nikolay Lunyak 8f8c7fe7cf [FIR] Properly calculate visibilities
`testIntersectionOfPrimitiveBasedFunctions`
is fine, because we deprecate this
already in ^KT-63243.

`CANNOT_INFER_VISIBILITY` is
positioned as `DECLARATION_NAME`,
just in case we decide for
some reason that we do want to
report it along with
`MANY_*_NOT_IMPLEMENTED`. In that
case, we'd get a problem that
their bounds overlap, but not
completely contain one another.

^KT-63741 Fixed
^KT-59400 Fixed
2024-02-15 16:10:14 +00:00

14 lines
233 B
Kotlin
Vendored

// ISSUES: KT-2491, KT-4785, KT-63741, KT-59400
interface T {
fun foo()
}
open class C {
protected fun foo() {}
}
class <!CANNOT_INFER_VISIBILITY!>E<!> : C(), T
val z: T = <!CANNOT_INFER_VISIBILITY!>object<!> : C(), T {}