cbe6e49a93
- when building a topsorted hierarchy, consider not only edges to the class' superclasses, but also from inner/nested classes to their container. This effectively means that a class cannot inherit from its nested class. Similar cases (see the tests) are disallowed in Java. - filter classes by their presence in TopDownAnalysisContext, not by being a MutableClassDescriptor (otherwise analysis for local classes ends up trying to do something with outer superclasses) - delete outdated comment: topsort is needed not only for better diagnostics, but also for correct order of fake overrides construction
22 lines
464 B
Kotlin
22 lines
464 B
Kotlin
// FILE: ExceptionTracker.kt
|
|
|
|
trait ExceptionTracker : <!CYCLIC_INHERITANCE_HIERARCHY!>LockBasedStorageManager.ExceptionHandlingStrategy<!> {
|
|
}
|
|
|
|
// FILE: StorageManager.kt
|
|
|
|
trait StorageManager : <!CYCLIC_INHERITANCE_HIERARCHY!>ExceptionTracker<!> {
|
|
fun foo()
|
|
}
|
|
|
|
// FILE: LockBasedStorageManager.java
|
|
|
|
class LockBasedStorageManager extends StorageManager {
|
|
interface ExceptionHandlingStrategy {
|
|
void bar();
|
|
}
|
|
|
|
@Override
|
|
void foo() {}
|
|
}
|