[FIR] Reproduce KT-65972
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
This commit is contained in:
committed by
Space Team
parent
3ce3c50b92
commit
053eb07692
+35
@@ -0,0 +1,35 @@
|
||||
// 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()
|
||||
Reference in New Issue
Block a user