[FIR] Fix type arguments and substitution for flexible types
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
FILE: main.kt
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
R|/MyFunction|<R|kotlin/Int|, R|kotlin/String|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/String| {
|
||||
R|/MyFunction|<R|kotlin/Int|, R|kotlin/String|>(<L> = MyFunction@fun <anonymous>(x: R|ft<kotlin/Int, kotlin/Int?>!|): R|kotlin/String| {
|
||||
^ R|<local>/x|.R|kotlin/Int.toInt|().R|kotlin/Any.toString|()
|
||||
}
|
||||
)
|
||||
@@ -8,7 +8,7 @@ FILE: main.kt
|
||||
^ R|<local>/x|.R|kotlin/Any.toString|()
|
||||
}
|
||||
)
|
||||
R|/MyFunction|<R|kotlin/Any?|, R|ft<kotlin/String, kotlin/String?>!|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Any?|): R|kotlin/String| {
|
||||
R|/MyFunction|<R|kotlin/Any?|, R|ft<kotlin/String, kotlin/String?>!|>(<L> = MyFunction@fun <anonymous>(x: R|ft<kotlin/Any?, kotlin/Any?>?|): R|kotlin/String| {
|
||||
^ String()
|
||||
}
|
||||
)
|
||||
|
||||
Vendored
+3
-3
@@ -6,11 +6,11 @@ FILE: main.kt
|
||||
public final fun <X, Y> foo3(f: R|MyFunction<X, Y>|, x: R|X|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
R|/foo1|(R|/MyFunction|<R|kotlin/Int|, R|kotlin/String|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/String| {
|
||||
R|/foo1|(R|/MyFunction|<R|kotlin/Int|, R|kotlin/String|>(<L> = MyFunction@fun <anonymous>(x: R|ft<kotlin/Int, kotlin/Int?>!|): R|kotlin/String| {
|
||||
^ R|<local>/x|.R|kotlin/Int.toInt|().R|kotlin/Any.toString|()
|
||||
}
|
||||
))
|
||||
R|/foo2|(R|/MyFunction|<R|kotlin/Number|, R|ft<kotlin/String, kotlin/String?>!|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Number|): R|kotlin/String| {
|
||||
R|/foo2|(R|/MyFunction|<R|kotlin/Number|, R|ft<kotlin/String, kotlin/String?>!|>(<L> = MyFunction@fun <anonymous>(x: R|ft<kotlin/Number, kotlin/Number?>!|): R|kotlin/String| {
|
||||
^ R|<local>/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|()
|
||||
}
|
||||
))
|
||||
@@ -18,7 +18,7 @@ FILE: main.kt
|
||||
^ R|<local>/x|.R|kotlin/Any.toString|()
|
||||
}
|
||||
))
|
||||
R|/foo3|<R|kotlin/Int|, R|ft<kotlin/String, kotlin/String?>!|>(R|/MyFunction|<R|kotlin/Int|, R|ft<kotlin/String, kotlin/String?>!|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/String| {
|
||||
R|/foo3|<R|kotlin/Int|, R|ft<kotlin/String, kotlin/String?>!|>(R|/MyFunction|<R|kotlin/Int|, R|ft<kotlin/String, kotlin/String?>!|>(<L> = MyFunction@fun <anonymous>(x: R|ft<kotlin/Int, kotlin/Int?>!|): R|kotlin/String| {
|
||||
^ R|<local>/x|.R|kotlin/Int.plus|(Int(1)).R|kotlin/Any.toString|()
|
||||
}
|
||||
), Int(1))
|
||||
|
||||
@@ -12,7 +12,7 @@ FILE: main.kt
|
||||
^ R|<local>/x|.R|kotlin/Any.toString|()
|
||||
}
|
||||
)
|
||||
Q|JavaUsage|.R|/JavaUsage.foo3|<R|kotlin/Int|, R|ft<kotlin/String, kotlin/String?>!|>(foo3@fun <anonymous>(x: R|kotlin/Int|): R|kotlin/String| {
|
||||
Q|JavaUsage|.R|/JavaUsage.foo3|<R|kotlin/Int|, R|ft<kotlin/String, kotlin/String?>!|>(foo3@fun <anonymous>(x: R|ft<kotlin/Int, kotlin/Int?>!|): R|kotlin/String| {
|
||||
^ R|<local>/x|.R|kotlin/Int.plus|(Int(1)).R|kotlin/Any.toString|()
|
||||
}
|
||||
, Int(1))
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// ISSUE: KT-37623
|
||||
// FULL_JDK
|
||||
// FILE: JavaEnum.java
|
||||
|
||||
public enum JavaEnum {
|
||||
A;
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
import java.util.EnumMap
|
||||
|
||||
val enumMap = EnumMap(
|
||||
mapOf(
|
||||
JavaEnum.A to "A"
|
||||
)
|
||||
)
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
FILE: main.kt
|
||||
public final val enumMap: R|java/util/EnumMap<ft<JavaEnum, JavaEnum?>!, ft<kotlin/String, kotlin/String?>!>| = R|java/util/EnumMap.EnumMap|<R|ft<JavaEnum, JavaEnum?>!|, R|ft<kotlin/String, kotlin/String?>!|>(R|kotlin/collections/mapOf|<R|ft<JavaEnum, JavaEnum?>!|, R|kotlin/String|>(Q|JavaEnum|.R|/JavaEnum.A|.R|kotlin/to|<R|JavaEnum|, R|kotlin/String|>(String(A))))
|
||||
public get(): R|java/util/EnumMap<ft<JavaEnum, JavaEnum?>!, ft<kotlin/String, kotlin/String?>!>|
|
||||
+1
-1
@@ -17,7 +17,7 @@ FILE: main.kt
|
||||
}
|
||||
|
||||
Q|JavaClass|.R|/JavaClass.foo2|(R|<local>/y|)
|
||||
Q|JavaClass|.R|/JavaClass.foo3|<R|kotlin/Int|>(foo3@fun <anonymous>(it: R|kotlin/Int|): R|ft<kotlin/String, kotlin/String?>!| {
|
||||
Q|JavaClass|.R|/JavaClass.foo3|<R|kotlin/Int|>(foo3@fun <anonymous>(it: R|ft<kotlin/Int, kotlin/Int?>!|): R|ft<kotlin/String, kotlin/String?>!| {
|
||||
^ R|<local>/it|.R|kotlin/Int.plus|(Int(4)).R|kotlin/Any.toString|()
|
||||
}
|
||||
, Int(5))
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
FILE: javaLangComparator.kt
|
||||
public final fun test_2(list: R|kotlin/collections/List<kotlin/Int>|): R|kotlin/Unit| {
|
||||
lval comp: R|java/util/Comparator<kotlin/Int>| = Q|java/util|.R|java/util/Comparator|<R|kotlin/Int|>(<L> = Comparator@fun <anonymous>(x: R|kotlin/Int|, y: R|kotlin/Int|): R|kotlin/Int| {
|
||||
lval comp: R|java/util/Comparator<kotlin/Int>| = Q|java/util|.R|java/util/Comparator|<R|kotlin/Int|>(<L> = Comparator@fun <anonymous>(x: R|ft<kotlin/Int, kotlin/Int?>!|, y: R|ft<kotlin/Int, kotlin/Int?>!|): R|kotlin/Int| {
|
||||
^ Int(1)
|
||||
}
|
||||
)
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
FILE: kotlinComparatorAlias.kt
|
||||
public final fun test_1(): R|kotlin/Unit| {
|
||||
lval comp: R|java/util/Comparator<kotlin/Int>| = R|java/util/Comparator|<R|kotlin/Int|>(<L> = Comparator@fun <anonymous>(x: R|kotlin/Int|, y: R|kotlin/Int|): R|kotlin/Int| {
|
||||
lval comp: R|java/util/Comparator<kotlin/Int>| = R|java/util/Comparator|<R|kotlin/Int|>(<L> = Comparator@fun <anonymous>(x: R|ft<kotlin/Int, kotlin/Int?>!|, y: R|ft<kotlin/Int, kotlin/Int?>!|): R|kotlin/Int| {
|
||||
^ Int(1)
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user