053eb07692
This code does lead to inferring `Visibilities.Unknown`, but it's not reported anywhere. This is because it happens inside `AbstractIntSet` which comes to us "pre-compiled" by javac, whereas `FirOverrideChecker` only checks members within `KotlinClass`. ^KT-65972
36 lines
867 B
Kotlin
Vendored
36 lines
867 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
// TARGET_BACKEND: JVM
|
|
|
|
// FILE: IntCollection.java
|
|
interface IntCollection<E> {
|
|
public boolean add(int key);
|
|
}
|
|
|
|
// FILE: IntSet.java
|
|
interface IntSet extends IntCollection {
|
|
public default boolean add(Integer it) { return true; }
|
|
|
|
// from the supertype
|
|
// public boolean add(int key);
|
|
}
|
|
|
|
// FILE: AbstractCollection.java
|
|
abstract class AbstractCollection<E> {
|
|
public boolean add(E it) { return true; }
|
|
}
|
|
|
|
// FILE: AbstractIntCollection.java
|
|
abstract class AbstractIntCollection extends AbstractCollection<Integer> {
|
|
public boolean add(int it) { return true; }
|
|
|
|
// from the supertype
|
|
// public default boolen add(Integer it) { return true; }
|
|
}
|
|
|
|
// FILE: AbstractIntSet.java
|
|
public abstract class AbstractIntSet extends AbstractIntCollection implements IntSet {}
|
|
|
|
// FILE: Main.kt
|
|
|
|
class KotlinClass : AbstractIntSet()
|