Files
kotlin-fork/compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withIrrelevantInterface_after.kt
T
Dmitry Savvinov 5cb949ad7f Fix language features in tests for gradual migration to 1.3 (part 2)
In 1.3, due to changes in language, testdata for some tests can be
different from 1.2

We want to simlultaneously test both versions, so instead of fixing
language version in such tests, we split them into two: one with fixed
1.2, another with fixed 1.3
2018-07-05 10:42:49 +03:00

21 lines
666 B
Kotlin
Vendored

// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
// see https://youtrack.jetbrains.com/issue/KT-21515
interface SomeIrrelevantInterface
// note that C.Base() supertype will be resolved in normal scope
abstract class <!CYCLIC_SCOPES_WITH_COMPANION!>DerivedAbstract<!> : C.Base()
class Data
public class C {
val data: Data = Data()
// Note that any supertype of Base will be resolved in error-scope, even if it absolutely irrelevant
// to the types in cycle.
open class <!CYCLIC_SCOPES_WITH_COMPANION!>Base<!>() : SomeIrrelevantInterface
companion <!CYCLIC_SCOPES_WITH_COMPANION!>object<!> : DerivedAbstract()
}