K2: repeat K1 representation for flexible type parameters

This commit changes the behavior of KT-59138 effectively declining it in 2.0.
However, we plan to implement KT-59138 behavior under a feature
flag in 2.0 (see KT-66447), and switch this feature on version 2.x.

Also, this commit implements the LC resolution about postponing
KT-57014 change. We don't have KT-57014 described behavior in 2.0 anymore.
However, we plan to implement a deprecation warning here, see KT-65578.

After this commit, 6 diagnostic tests become incorrectly broken:
- 5 tests from PurelyImplementedCollection group
- a test platformTypes/nullableTypeArgument.kt

This commit also breaks currently fixed-in-k2 KT-50134
(it is fixed again in the following commits),
as well as KT-58933 (it will remain not fixed till we enable KT-59138
behavior again).

#KT-65596 In Progress
#KT-57014 In Progress
#KT-58933 Submitted
This commit is contained in:
Denis.Zharkov
2024-02-06 15:33:03 +01:00
committed by Space Team
parent 7fd46f1450
commit 81414d758d
160 changed files with 343 additions and 479 deletions
@@ -7,7 +7,7 @@ FILE: main.kt
public abstract interface PsiClass : R|kotlin/Any| {
}
public final fun test(): R|kotlin/Unit| {
lval processor: R|AdapterProcessor<PsiMethod, PsiClass>| = R|/AdapterProcessor.AdapterProcessor|<R|PsiMethod|, R|PsiClass|>(R|/Function|<R|PsiMethod!|, R|PsiClass!|>(<L> = Function@fun <anonymous>(method: R|PsiMethod?|): R|PsiClass!| <inline=NoInline> {
lval processor: R|AdapterProcessor<PsiMethod!, PsiClass!>| = R|/AdapterProcessor.AdapterProcessor|<R|PsiMethod!|, R|PsiClass!|>(R|/Function|<R|PsiMethod!|, R|PsiClass?|>(<L> = Function@fun <anonymous>(method: R|PsiMethod?|): R|PsiClass?| <inline=NoInline> {
^ R|<local>/method|?.{ $subj$.R|/PsiMethod.containingClass| }
}
))
@@ -1,4 +1,4 @@
FILE: main.kt
public final fun <T> test(executor: R|BuildActionExecuter<T>|, modelType: R|java/lang/Class<T>|, env: R|kotlin/collections/Map<kotlin/String, kotlin/String>|): R|kotlin/Unit| {
lval model: R|ft<BuildActionExecuter<ft<T & Any, T?>>, BuildActionExecuter<ft<T & Any, T?>>?>| = R|<local>/executor|.R|SubstitutionOverride</BuildActionExecuter.setEnvironmentVariables: R|ft<BuildActionExecuter<ft<T & Any, T?>>, BuildActionExecuter<ft<T & Any, T?>>?>|>|(R|<local>/env|)
lval model: R|ft<BuildActionExecuter<T!>, BuildActionExecuter<T!>?>| = R|<local>/executor|.R|SubstitutionOverride</BuildActionExecuter.setEnvironmentVariables: R|ft<BuildActionExecuter<T!>, BuildActionExecuter<T!>?>|>|(R|<local>/env|)
}
@@ -26,13 +26,13 @@ FILE: main.kt
}
public final fun test_1(): R|kotlin/Unit| {
lval map: R|util/HashMap<kotlin/Int, kotlin/Int>| = R|util/HashMap.HashMap|<R|kotlin/Int|, R|kotlin/Int|>()
lval map: R|util/HashMap<kotlin/Int!, kotlin/Int!>| = R|util/HashMap.HashMap|<R|kotlin/Int!|, R|kotlin/Int!|>()
}
public final fun test_2(): R|kotlin/Unit| {
lval set: R|util/HashSet<kotlin/Int>| = R|util/HashSet.HashSet|<R|kotlin/Int|>()
}
public final fun test_3(): R|kotlin/Unit| {
lval list: R|foo/ArrayList<kotlin/Int>| = R|foo/ArrayList.ArrayList|<R|kotlin/Int|>()
lval list: R|foo/ArrayList<kotlin/Int!>| = R|foo/ArrayList.ArrayList|<R|kotlin/Int!|>()
}
public final fun test_4(): R|kotlin/Unit| {
lval list: R|foo/LinkedList<kotlin/Int>| = R|foo/LinkedList.LinkedList|<R|kotlin/Int|>()
@@ -13,8 +13,8 @@ FILE: test.kt
lval element: R|DE| = R|<local>/d|.R|/Diagnostic.element|
R|/Fix.Fix|(R|<local>/element|)
}
private final val DERIVED_FACTORY: R|DiagnosticFactory0<DerivedElement>| = R|/DiagnosticFactory0.DiagnosticFactory0|<R|DerivedElement|>()
private get(): R|DiagnosticFactory0<DerivedElement>|
private final val DERIVED_FACTORY: R|DiagnosticFactory0<DerivedElement!>| = R|/DiagnosticFactory0.DiagnosticFactory0|<R|DerivedElement!|>()
private get(): R|DiagnosticFactory0<DerivedElement!>|
public final fun createViaFactory(d: R|EmptyDiagnostic|): R|kotlin/Unit| {
lval casted: R|Diagnostic<DerivedElement!>| = R|/DERIVED_FACTORY|.R|SubstitutionOverride</DiagnosticFactory0.cast: R|@EnhancedNullability Diagnostic<DerivedElement!>|>|(R|<local>/d|)
lval element: R|DerivedElement| = R|<local>/casted|.R|/Diagnostic.element|
@@ -1,6 +1,6 @@
FILE: flexibleTypeBug.kt
public final fun foo(): R|kotlin/Unit| {
lvar list1: R|ft<kotlin/collections/MutableList<kotlin/String!>, kotlin/collections/List<kotlin/String!>?>| = Q|java/util/Collections|.R|java/util/Collections.emptyList*s|<R|kotlin/String|>()
lvar list1: R|ft<kotlin/collections/MutableList<kotlin/String!>, kotlin/collections/List<kotlin/String!>?>| = Q|java/util/Collections|.R|java/util/Collections.emptyList*s|<R|kotlin/String!|>()
lval list2: R|kotlin/collections/List<kotlin/String>| = R|kotlin/collections/listOf|<R|kotlin/String|>(String(b))
R|<local>/list1| = R|<local>/list1|.R|kotlin/collections/plus|<R|kotlin/String!|>(R|<local>/list2|)
}
@@ -1,7 +1,7 @@
FILE: javaCollector.kt
public final fun foo(): R|kotlin/Unit| {
R|kotlin/collections/listOf|<R|kotlin/String|>(String()).R|SubstitutionOverride<kotlin/collections/List.stream: R|@EnhancedNullability java/util/stream/Stream<@EnhancedNullability kotlin/String>|>|().R|SubstitutionOverride<java/util/stream/Stream.collect: R|ft<R & Any, R?>|>|<R|ft<kotlin/collections/MutableMap<kotlin/String!, kotlin/Int!>, kotlin/collections/Map<kotlin/String!, kotlin/Int!>?>|, R|ft<CapturedType(*), CapturedType(*)?>|>(Q|java/util/stream/Collectors|.R|java/util/stream/Collectors.groupingBy*s|<R|kotlin/String!|, R|kotlin/String!|, R|ft<CapturedType(*), CapturedType(*)?>|, R|kotlin/Int!|>(SAM(groupingBy@fun <anonymous>(it: R|@EnhancedNullability kotlin/String!|): R|@EnhancedNullability kotlin/String!| <inline=NoInline> {
R|kotlin/collections/listOf|<R|kotlin/String|>(String()).R|SubstitutionOverride<kotlin/collections/List.stream: R|@EnhancedNullability java/util/stream/Stream<@EnhancedNullability kotlin/String>|>|().R|SubstitutionOverride<java/util/stream/Stream.collect: R|R!|><Inapplicable(INAPPLICABLE): java/util/stream/Stream.collect>#|<<ERROR TYPE REF: Cannot infer argument for type parameter R>, <ERROR TYPE REF: Cannot infer argument for type parameter A>>(Q|java/util/stream/Collectors|.R|java/util/stream/Collectors.groupingBy*s<CS errors: java/util/stream/Collectors.groupingBy>#|<R|kotlin/String!|, <ERROR TYPE REF: Cannot infer argument for type parameter K>, R|kotlin/Any!|, R|kotlin/Int!|>(SAM(groupingBy@fun <anonymous>(it: R|@EnhancedNullability kotlin/String!|): <ERROR TYPE REF: Cannot infer argument for type parameter K> <inline=NoInline> {
^ R|<local>/it|
}
), Q|java/util/stream/Collectors|.R|java/util/stream/Collectors.collectingAndThen*s|<R|kotlin/String!|, R|ft<CapturedType(*), CapturedType(*)?>|, R|kotlin/Long!|, R|kotlin/Int!|>(Q|java/util/stream/Collectors|.R|java/util/stream/Collectors.counting*s|<R|kotlin/String|>(), SAM(Q|kotlin/Long|::R|kotlin/Long.toInt|))))
), Q|java/util/stream/Collectors|.R|java/util/stream/Collectors.collectingAndThen*s|<R|kotlin/String!|, R|ft<CapturedType(*), CapturedType(*)?>|, R|kotlin/Long!|, R|kotlin/Int!|>(Q|java/util/stream/Collectors|.R|java/util/stream/Collectors.counting*s|<R|kotlin/String!|>(), SAM(Q|kotlin/Long|::R|kotlin/Long.toInt|))))
}
@@ -6,12 +6,12 @@ import java.util.stream.Collectors
fun foo(){
listOf("").stream().collect(
Collectors.groupingBy(
<!ARGUMENT_TYPE_MISMATCH, NEW_INFERENCE_ERROR!>Collectors.groupingBy(
{ it },
Collectors.collectingAndThen(
Collectors.counting<String>(),
Long::toInt
)
)
)<!>
)
}
@@ -41,9 +41,9 @@ FILE: onlyInputTypesCapturedTypeWithRecursiveBounds.kt
}
private final fun test(node: R|FooEnumMap<*>|): R|kotlin/Unit| {
R|<local>/node|.R|SubstitutionOverride</FooEnumMap.data: R|java/util/EnumMap<CapturedType(*), kotlin/Any?>|>|.R|kotlin/collections/get|<R|ft<it(kotlin/Enum<*> & I), it(kotlin/Enum<*>? & I?)>|, R|kotlin/Any!|>(Q|MyEnum|.R|/MyEnum.EnumEntry|)
R|<local>/node|.R|SubstitutionOverride</FooEnumMap.data: R|java/util/EnumMap<CapturedType(*), kotlin/Any?>|>|.R|kotlin/collections/get|<R|ft<it(kotlin/Enum<*> & I), it(kotlin/Enum<*>? & I?)>|, R|kotlin/Any?|>(Q|MyEnum|.R|/MyEnum.EnumEntry|)
lval map: R|java/util/EnumMap<out it(kotlin/Enum<*> & I), kotlin/Any?>| = R|<local>/node|.R|SubstitutionOverride</FooEnumMap.data: R|java/util/EnumMap<CapturedType(*), kotlin/Any?>|>|
R|<local>/map|.R|kotlin/collections/get|<R|ft<it(kotlin/Enum<out ft<it(kotlin/Enum<out ft<it(kotlin/Enum<*> & I), it(kotlin/Enum<*>? & I?)>> & I), it(kotlin/Enum<*>? & I?)>> & I), it(kotlin/Enum<*>? & I?)>|, R|kotlin/Any!|>(Q|MyEnum|.R|/MyEnum.EnumEntry|)
R|<local>/map|.R|kotlin/collections/get|<R|ft<it(kotlin/Enum<*> & I), it(kotlin/Enum<*>? & I?)>|, R|kotlin/Any?|>(Q|MyEnum|.R|/MyEnum.EnumEntry|)
}
public open class Foo2<P : R|I|> : R|kotlin/Any| {
public constructor<P : R|I|>(data: R|kotlin/collections/Map<P, kotlin/Any?>|): R|Foo2<P>| {
@@ -1,6 +1,6 @@
FILE: main.kt
public final fun main(): R|kotlin/Unit| {
lval a: R|ft<Java<*, kotlin/String!>, Java<*, kotlin/String!>?>| = Q|Java|.R|/Java.factory*s|<R|kotlin/String!|>(String())
lval b: R|ft<Java<*, kotlin/String!>, Java<*, kotlin/String!>?>| = R|<local>/a|.R|SubstitutionOverride</Java.produceSelf: R|ft<CapturedType(*) & Any, CapturedType(*)?>|>|()
lval b: R|ft<Java<*, kotlin/String!>, Java<*, kotlin/String!>?>| = R|<local>/a|.R|SubstitutionOverride</Java.produceSelf: R|ft<CapturedType(*), CapturedType(*)?>|>|()
R|<local>/b|.R|SubstitutionOverride</Java.consumeElement: R|kotlin/Unit|>|(String(testing))
}
@@ -1,4 +1,4 @@
FILE: main.kt
public final fun main(): R|kotlin/Unit| {
R|/JavaClass.JavaClass|<R|kotlin/String|>(Null(null)).R|SubstitutionOverride</JavaClass.foo: R|kotlin/String!|>|().R|kotlin/String.length|
R|/JavaClass.JavaClass|<R|kotlin/String!|>(Null(null)).R|SubstitutionOverride</JavaClass.foo: R|kotlin/String!|>|().R|kotlin/String.length|
}
@@ -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!| <inline=NoInline> {
R|/MyFunction|<R|kotlin/Int!|, R|kotlin/String!|>(<L> = MyFunction@fun <anonymous>(x: R|kotlin/Int!|): R|kotlin/String!| <inline=NoInline> {
^ R|<local>/x|.R|kotlin/Int.toInt|().R|kotlin/Int.toString|()
}
)
@@ -3,8 +3,8 @@ C:
[Enhancement]: public abstract fun getName(): R|kotlin/String!| from Substitution scope for [Java enhancement scope for /B] for type C [id: 1]
[Enhancement]: public abstract fun getName(): R|kotlin/String!| from Java enhancement scope for /A [id: 1]
[Source]: public open override fun setName(newName: R|kotlin/String|): R|kotlin/Any?| from Use site scope of /C [id: 0]
[SubstitutionOverride(DeclarationSite)]: public abstract override fun setName(newName: R|kotlin/String!|): R|kotlin/Any!| from Substitution scope for [Java enhancement scope for /B] for type C [id: 1]
[Enhancement]: public abstract fun setName(newName: R|kotlin/String!|): R|ft<T & Any, T?>| from Java enhancement scope for /B [id: 2]
[SubstitutionOverride(DeclarationSite)]: public abstract override fun setName(newName: R|kotlin/String!|): R|kotlin/Any?| from Substitution scope for [Java enhancement scope for /B] for type C [id: 1]
[Enhancement]: public abstract fun setName(newName: R|kotlin/String!|): R|T!| from Java enhancement scope for /B [id: 2]
[Source]: private final var name: R|kotlin/String| from Use site scope of /C [id: 0]
D:
@@ -14,8 +14,8 @@ D:
[Enhancement]: public abstract fun getName(): R|kotlin/String!| from Java enhancement scope for /A [id: 1]
[Source]: public open override fun setName(newName: R|kotlin/String|): R|kotlin/Any?| from Java enhancement scope for /D [id: 0]
[Source]: public open override fun setName(newName: R|kotlin/String|): R|kotlin/Any?| from Use site scope of /C [id: 0]
[SubstitutionOverride(DeclarationSite)]: public abstract override fun setName(newName: R|kotlin/String!|): R|kotlin/Any!| from Substitution scope for [Java enhancement scope for /B] for type C [id: 1]
[Enhancement]: public abstract fun setName(newName: R|kotlin/String!|): R|ft<T & Any, T?>| from Java enhancement scope for /B [id: 2]
[SubstitutionOverride(DeclarationSite)]: public abstract override fun setName(newName: R|kotlin/String!|): R|kotlin/Any?| from Substitution scope for [Java enhancement scope for /B] for type C [id: 1]
[Enhancement]: public abstract fun setName(newName: R|kotlin/String!|): R|T!| from Java enhancement scope for /B [id: 2]
[Source]: private final var name: R|kotlin/String| from Java enhancement scope for /D [id: 0]
[Source]: private final var name: R|kotlin/String| from Use site scope of /C [id: 0]
@@ -1,6 +1,6 @@
SomeMap:
[Enhancement]: public abstract fun containsKey(key: R|ft<K3 & Any, K3?>|): R|kotlin/Boolean| from Java enhancement scope for /SomeMap [id: 0]
[SubstitutionOverride(DeclarationSite)]: public abstract override fun containsKey(key: R|ft<K3 & Any, K3?>|): R|kotlin/Boolean| from Substitution scope for [Use site scope of kotlin/collections/MutableMap] for type SomeMap<K3, V3> [id: 1]
[Enhancement]: public abstract fun containsKey(key: R|K3!|): R|kotlin/Boolean| from Java enhancement scope for /SomeMap [id: 0]
[SubstitutionOverride(DeclarationSite)]: public abstract override fun containsKey(key: R|K3!|): R|kotlin/Boolean| from Substitution scope for [Use site scope of kotlin/collections/MutableMap] for type SomeMap<K3, V3> [id: 1]
[SubstitutionOverride(DeclarationSite)]: public abstract override fun containsKey(key: R|K|): R|kotlin/Boolean| from Use site scope of kotlin/collections/MutableMap [id: 2]
[SubstitutionOverride(DeclarationSite)]: public abstract override fun containsKey(key: R|K|): R|kotlin/Boolean| from Substitution scope for [Use site scope of kotlin/collections/Map] for type kotlin/collections/MutableMap<K, V> [id: 2]
[Library]: public abstract fun containsKey(key: R|K|): R|kotlin/Boolean| from Use site scope of kotlin/collections/Map [id: 3]
@@ -8,25 +8,25 @@ SomeMap:
[Enhancement]: public abstract fun containsKey(key: R|kotlin/Any!|): R|kotlin/Boolean| from Java enhancement scope for /MyMap [id: 5]
[SubstitutionOverride(DeclarationSite)]: public abstract override fun containsKey(key: R|kotlin/Any!|): R|kotlin/Boolean| from Substitution scope for [Java enhancement scope for /MyBaseMap] for type MyMap<K2, V2> [id: 6]
[Enhancement]: public abstract fun containsKey(key: R|kotlin/Any!|): R|kotlin/Boolean| from Java enhancement scope for /MyBaseMap [id: 7]
[IntersectionOverride]: public abstract override fun containsValue(value: R|ft<V3 & Any, V3?>|): R|kotlin/Boolean| from Java enhancement scope for /SomeMap [id: 0]
[SubstitutionOverride(DeclarationSite)]: public abstract override fun containsValue(value: R|ft<V3 & Any, V3?>|): R|kotlin/Boolean| from Substitution scope for [Use site scope of kotlin/collections/MutableMap] for type SomeMap<K3, V3> [id: 1]
[IntersectionOverride]: public abstract override fun containsValue(value: R|V3!|): R|kotlin/Boolean| from Java enhancement scope for /SomeMap [id: 0]
[SubstitutionOverride(DeclarationSite)]: public abstract override fun containsValue(value: R|V3!|): R|kotlin/Boolean| from Substitution scope for [Use site scope of kotlin/collections/MutableMap] for type SomeMap<K3, V3> [id: 1]
[SubstitutionOverride(DeclarationSite)]: public abstract override fun containsValue(value: R|V|): R|kotlin/Boolean| from Use site scope of kotlin/collections/MutableMap [id: 2]
[SubstitutionOverride(DeclarationSite)]: public abstract override fun containsValue(value: R|V|): R|kotlin/Boolean| from Substitution scope for [Use site scope of kotlin/collections/Map] for type kotlin/collections/MutableMap<K, V> [id: 2]
[Library]: public abstract fun containsValue(value: R|V|): R|kotlin/Boolean| from Use site scope of kotlin/collections/Map [id: 3]
[SubstitutionOverride(DeclarationSite)]: public abstract override fun containsValue(key: R|kotlin/Any!|): R|kotlin/Boolean| from Substitution scope for [Java enhancement scope for /MyMap] for type SomeMap<K3, V3> [id: 4]
[Enhancement]: public abstract fun containsValue(key: R|kotlin/Any!|): R|kotlin/Boolean| from Java enhancement scope for /MyMap [id: 5]
[IntersectionOverride]: public abstract override operator fun get(key: R|ft<K3 & Any, K3?>|): R|V3?| from Java enhancement scope for /SomeMap [id: 0]
[SubstitutionOverride(DeclarationSite)]: public abstract override operator fun get(key: R|ft<K3 & Any, K3?>|): R|V3?| from Substitution scope for [Use site scope of kotlin/collections/MutableMap] for type SomeMap<K3, V3> [id: 1]
[IntersectionOverride]: public abstract override operator fun get(key: R|K3!|): R|V3?| from Java enhancement scope for /SomeMap [id: 0]
[SubstitutionOverride(DeclarationSite)]: public abstract override operator fun get(key: R|K3!|): R|V3?| from Substitution scope for [Use site scope of kotlin/collections/MutableMap] for type SomeMap<K3, V3> [id: 1]
[SubstitutionOverride(DeclarationSite)]: public abstract override operator fun get(key: R|K|): R|V?| from Use site scope of kotlin/collections/MutableMap [id: 2]
[SubstitutionOverride(DeclarationSite)]: public abstract override operator fun get(key: R|K|): R|V?| from Substitution scope for [Use site scope of kotlin/collections/Map] for type kotlin/collections/MutableMap<K, V> [id: 2]
[Library]: public abstract operator fun get(key: R|K|): R|V?| from Use site scope of kotlin/collections/Map [id: 3]
[SubstitutionOverride(DeclarationSite)]: public abstract override operator fun get(key: R|ft<K3 & Any, K3?>|): R|ft<V3 & Any, V3?>| from Substitution scope for [Java enhancement scope for /MyMap] for type SomeMap<K3, V3> [id: 4]
[Enhancement]: public abstract operator fun get(key: R|ft<K2 & Any, K2?>|): R|ft<V2 & Any, V2?>| from Java enhancement scope for /MyMap [id: 5]
[Enhancement]: public abstract fun remove(key: R|ft<K3 & Any, K3?>|): R|@EnhancedNullability V3?| from Java enhancement scope for /SomeMap [id: 0]
[SubstitutionOverride(DeclarationSite)]: public abstract override fun remove(key: R|ft<K3 & Any, K3?>|): R|V3?| from Substitution scope for [Use site scope of kotlin/collections/MutableMap] for type SomeMap<K3, V3> [id: 1]
[SubstitutionOverride(DeclarationSite)]: public abstract override operator fun get(key: R|K3!|): R|V3!| from Substitution scope for [Java enhancement scope for /MyMap] for type SomeMap<K3, V3> [id: 4]
[Enhancement]: public abstract operator fun get(key: R|K2!|): R|V2!| from Java enhancement scope for /MyMap [id: 5]
[Enhancement]: public abstract fun remove(key: R|K3!|): R|@EnhancedNullability V3?| from Java enhancement scope for /SomeMap [id: 0]
[SubstitutionOverride(DeclarationSite)]: public abstract override fun remove(key: R|K3!|): R|V3?| from Substitution scope for [Use site scope of kotlin/collections/MutableMap] for type SomeMap<K3, V3> [id: 1]
[Library]: public abstract fun remove(key: R|K|): R|V?| from Use site scope of kotlin/collections/MutableMap [id: 2]
[SubstitutionOverride(DeclarationSite)]: public open override fun remove(key: R|ft<K3 & Any, K3?>|, value: R|ft<V3 & Any, V3?>|): R|kotlin/Boolean| from Java enhancement scope for /SomeMap [id: 0]
[SubstitutionOverride(DeclarationSite)]: public open override fun remove(key: R|ft<K3 & Any, K3?>|, value: R|ft<V3 & Any, V3?>|): R|kotlin/Boolean| from Substitution scope for [Use site scope of kotlin/collections/MutableMap] for type SomeMap<K3, V3> [id: 0]
[SubstitutionOverride(DeclarationSite)]: public open override fun remove(key: R|K3!|, value: R|V3!|): R|kotlin/Boolean| from Java enhancement scope for /SomeMap [id: 0]
[SubstitutionOverride(DeclarationSite)]: public open override fun remove(key: R|K3!|, value: R|V3!|): R|kotlin/Boolean| from Substitution scope for [Use site scope of kotlin/collections/MutableMap] for type SomeMap<K3, V3> [id: 0]
[Library]: public open fun remove(key: R|K|, value: R|V|): R|kotlin/Boolean| from Use site scope of kotlin/collections/MutableMap [id: 1]
MyMap:
@@ -34,5 +34,5 @@ MyMap:
[SubstitutionOverride(DeclarationSite)]: public abstract override fun containsKey(key: R|kotlin/Any!|): R|kotlin/Boolean| from Substitution scope for [Java enhancement scope for /MyBaseMap] for type MyMap<K2, V2> [id: 1]
[Enhancement]: public abstract fun containsKey(key: R|kotlin/Any!|): R|kotlin/Boolean| from Java enhancement scope for /MyBaseMap [id: 2]
[Enhancement]: public abstract fun containsValue(key: R|kotlin/Any!|): R|kotlin/Boolean| from Java enhancement scope for /MyMap [id: 0]
[Enhancement]: public abstract operator fun get(key: R|ft<K2 & Any, K2?>|): R|ft<V2 & Any, V2?>| from Java enhancement scope for /MyMap [id: 0]
[Enhancement]: public abstract operator fun get(key: R|K2!|): R|V2!| from Java enhancement scope for /MyMap [id: 0]
@@ -1,5 +1,5 @@
FILE: main.kt
public final fun <T : R|kotlin/CharSequence?|> foo(mapper: R|Mapper|, cls: R|java/lang/Class<T>?|): R|kotlin/Unit| {
lval result: R|T & Any| = R|<local>/mapper|.R|/Mapper.readValue|<R|T|>(R|<local>/cls|)!!
lval result: R|T & Any| = R|<local>/mapper|.R|/Mapper.readValue|<R|T!|>(R|<local>/cls|)!!
R|<local>/result|.R|kotlin/CharSequence.length|
}
@@ -15,7 +15,7 @@ public interface Option<T> {
// FILE: test.kt
fun test_1(option: Option<Pair<String, String>>?) {
if (option is Option.Some<*>) {
val x = <!DEBUG_INFO_EXPRESSION_TYPE("CapturedType(*)!! & kotlin.Pair<kotlin.String, kotlin.String>..CapturedType(*)? & kotlin.Pair<kotlin.String, kotlin.String>?")!>option.get()<!>.first
val x = <!DEBUG_INFO_EXPRESSION_TYPE("CapturedType(*) & kotlin.Pair<kotlin.String, kotlin.String>..CapturedType(*)? & kotlin.Pair<kotlin.String, kotlin.String>?")!>option.get()<!>.first
x.length
}
}
@@ -1,8 +1,8 @@
FILE: main.kt
private final val anyProperty: R|Property<kotlin/Any>| = R|/Property.Property|<R|kotlin/Any|>()
private get(): R|Property<kotlin/Any>|
private final val boundedProperty: R|Property<kotlin/String>| = R|/Property.Property|<R|kotlin/String|>()
private get(): R|Property<kotlin/String>|
private final val anyProperty: R|Property<kotlin/Any!>| = R|/Property.Property|<R|kotlin/Any!|>()
private get(): R|Property<kotlin/Any!>|
private final val boundedProperty: R|Property<kotlin/String!>| = R|/Property.Property|<R|kotlin/String!|>()
private get(): R|Property<kotlin/String!>|
public final fun test_1(x: R|Property<kotlin/Any>|): R|kotlin/Unit| {
when () {
(R|<local>/x| is R|Reference|) -> {
@@ -3,5 +3,5 @@ FILE: main.kt
public final typealias ImmutableSet<E> = R|MySet<E>|
private final typealias ImmutableMultimap<K, V> = R|ImmutableMap<K, ImmutableSet<V>>|
private final fun <K, V> R|ImmutableMultimap<K, V>|.put(key: R|K|, value: R|V|, oldSet: R|ImmutableSet<V>|): R|ImmutableMultimap<K, V>| {
^put this@R|/put|.R|SubstitutionOverride</MyMap.put: R|ft<MyMap<ft<K & Any, K?>, ft<ImmutableSet<V>, ImmutableSet<V>?>>, MyMap<ft<K & Any, K?>, ft<ImmutableSet<V>, ImmutableSet<V>?>>?>|>|(R|<local>/key|, R|<local>/oldSet|.R|SubstitutionOverride</MySet.add: R|ft<MySet<ft<V & Any, V?>>, MySet<ft<V & Any, V?>>?>|>|(R|<local>/value|))
^put this@R|/put|.R|SubstitutionOverride</MyMap.put: R|ft<MyMap<K!, ft<ImmutableSet<V>, ImmutableSet<V>?>>, MyMap<K!, ft<ImmutableSet<V>, ImmutableSet<V>?>>?>|>|(R|<local>/key|, R|<local>/oldSet|.R|SubstitutionOverride</MySet.add: R|ft<MySet<V!>, MySet<V!>?>|>|(R|<local>/value|))
}