ConeTypeIntersector: preserve raw & dynamic types as is

This commit is contained in:
Mikhail Glukhikh
2023-01-03 18:03:21 +01:00
committed by Space Team
parent 55fdb43620
commit 1344a9b1bb
8 changed files with 115 additions and 1 deletions
@@ -0,0 +1,27 @@
FILE: test.kt
public abstract interface StringSet : R|kotlin/collections/MutableSet<kotlin/String>| {
}
public final fun foo(arg: R|kotlin/Boolean|): R|kotlin/Unit| {
lval x: R|ft<Raw type java/util/ArrayList<kotlin/Any!>, @EnhancedNullability java/util/ArrayList<*>>| = Q|Producer|.R|/Producer.foo|()
when () {
(R|<local>/x| is R|kotlin/collections/Set<*>|) -> {
lval y: R|ft<Raw type java/util/ArrayList<kotlin/Any!>, @EnhancedNullability java/util/ArrayList<*>>| = R|<local>/x|
}
}
when () {
(R|<local>/x| is R|kotlin/collections/MutableSet<*>|) -> {
lval y: R|ft<Raw type java/util/ArrayList<kotlin/Any!>, @EnhancedNullability java/util/ArrayList<*>>| = R|<local>/x|
}
}
when () {
(R|<local>/x| is R|StringSet|) -> {
R|<local>/x|.R|SubstitutionOverride</StringSet.add: R|kotlin/Boolean|>|(String())
R|<local>/x|.R|SubstitutionOverride<java/util/ArrayList.add: R|kotlin/Boolean|>|(Int(1))
R|<local>/x|.R|SubstitutionOverride<java/util/ArrayList.add: R|kotlin/Boolean|>|(Null(null))
R|<local>/x|.R|SubstitutionOverride</StringSet.iterator: R|kotlin/collections/MutableIterator<kotlin/String>|>|().R|SubstitutionOverride<kotlin/collections/MutableIterator.next: R|kotlin/String|>|().R|kotlin/String.length|
}
}
}