da6006b7d0
Allow multiple bases with default implementations as long as there's a non-abstract symbol from a class. Our rules for Kotlin are stricter than those in Java.
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()
|