FIR: Fix hanging inference case with intersection types
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
// FILE: MyList.java
|
||||
public interface MyList<E> extends java.util.List<E>, I {}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun <R> elemAndList(r: R, t: MutableList<R>): R = TODO()
|
||||
|
||||
interface I
|
||||
class A : Comparable<A>, I
|
||||
class B : Comparable<B>, I
|
||||
|
||||
fun test() {
|
||||
elemAndList(A(), list(B()))
|
||||
}
|
||||
|
||||
fun <T> list(value: T): MyList<T> = TODO()
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
FILE: main.kt
|
||||
public final fun <R> elemAndList(r: R|R|, t: R|kotlin/collections/MutableList<R>|): R|R| {
|
||||
^elemAndList R|kotlin/TODO|()
|
||||
}
|
||||
public abstract interface I : R|kotlin/Any| {
|
||||
}
|
||||
public final class A : R|kotlin/Comparable<A>|, R|I| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final class B : R|kotlin/Comparable<B>|, R|I| {
|
||||
public constructor(): R|B| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
R|/elemAndList|<R|ft<it(kotlin/Comparable<it(A & B)> & I), it(kotlin/Comparable<it(A & B)>? & I?)>|>(R|/A.A|(), R|/list|<R|ft<it(kotlin/Comparable<it(A & B)> & I), it(kotlin/Comparable<it(A & B)>? & I?)>|>(R|/B.B|()))
|
||||
}
|
||||
public final fun <T> list(value: R|T|): R|MyList<T>| {
|
||||
^list R|kotlin/TODO|()
|
||||
}
|
||||
Reference in New Issue
Block a user