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:
committed by
Space Team
parent
7fd46f1450
commit
81414d758d
+3
-3
@@ -7,13 +7,13 @@ KtSuccessCallInfo:
|
||||
signature = KtFunctionLikeSignature:
|
||||
receiverType = null
|
||||
returnType = java.util.Comparator<kotlin.Int!>
|
||||
symbol = kotlin/Comparator(function: kotlin.Function2<ft<T & Any, T?>, ft<T & Any, T?>, kotlin.Int>): java.util.Comparator<T>
|
||||
symbol = kotlin/Comparator(function: kotlin.Function2<T!, T!, kotlin.Int>): java.util.Comparator<T>
|
||||
valueParameters = [
|
||||
KtVariableLikeSignature:
|
||||
name = function
|
||||
receiverType = null
|
||||
returnType = kotlin.Function2<kotlin.Int!, kotlin.Int!, kotlin.Int>
|
||||
symbol = function: kotlin.Function2<ft<T & Any, T?>, ft<T & Any, T?>, kotlin.Int>
|
||||
symbol = function: kotlin.Function2<T!, T!, kotlin.Int>
|
||||
callableIdIfNonLocal = null
|
||||
]
|
||||
callableIdIfNonLocal = kotlin/Comparator
|
||||
@@ -25,6 +25,6 @@ KtSuccessCallInfo:
|
||||
name = function
|
||||
receiverType = null
|
||||
returnType = kotlin.Function2<kotlin.Int!, kotlin.Int!, kotlin.Int>
|
||||
symbol = function: kotlin.Function2<ft<T & Any, T?>, ft<T & Any, T?>, kotlin.Int>
|
||||
symbol = function: kotlin.Function2<T!, T!, kotlin.Int>
|
||||
callableIdIfNonLocal = null)
|
||||
}
|
||||
|
||||
+3
-3
@@ -7,13 +7,13 @@ KtApplicableCallCandidateInfo:
|
||||
signature = KtFunctionLikeSignature:
|
||||
receiverType = null
|
||||
returnType = java.util.Comparator<kotlin.Int!>
|
||||
symbol = kotlin/Comparator(function: kotlin.Function2<ft<T & Any, T?>, ft<T & Any, T?>, kotlin.Int>): java.util.Comparator<T>
|
||||
symbol = kotlin/Comparator(function: kotlin.Function2<T!, T!, kotlin.Int>): java.util.Comparator<T>
|
||||
valueParameters = [
|
||||
KtVariableLikeSignature:
|
||||
name = function
|
||||
receiverType = null
|
||||
returnType = kotlin.Function2<kotlin.Int!, kotlin.Int!, kotlin.Int>
|
||||
symbol = function: kotlin.Function2<ft<T & Any, T?>, ft<T & Any, T?>, kotlin.Int>
|
||||
symbol = function: kotlin.Function2<T!, T!, kotlin.Int>
|
||||
callableIdIfNonLocal = null
|
||||
]
|
||||
callableIdIfNonLocal = kotlin/Comparator
|
||||
@@ -25,7 +25,7 @@ KtApplicableCallCandidateInfo:
|
||||
name = function
|
||||
receiverType = null
|
||||
returnType = kotlin.Function2<kotlin.Int!, kotlin.Int!, kotlin.Int>
|
||||
symbol = function: kotlin.Function2<ft<T & Any, T?>, ft<T & Any, T?>, kotlin.Int>
|
||||
symbol = function: kotlin.Function2<T!, T!, kotlin.Int>
|
||||
callableIdIfNonLocal = null)
|
||||
}
|
||||
isInBestCandidates = true
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
open fun hello()
|
||||
|
||||
open fun <T : kotlin.Any!> method(vararg classes: java.lang.Class<out (T & kotlin.Any..T?)>!)
|
||||
open fun <T : kotlin.Any!> method(vararg classes: java.lang.Class<out T!>!)
|
||||
|
||||
@java.lang.Override
|
||||
open fun getActualRandomNumber(): kotlin.Int
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ KtFunctionSymbol:
|
||||
receiverParameter: null
|
||||
returnType: KtFlexibleType:
|
||||
annotationsList: []
|
||||
type: ft<java/lang/Class<out ft<T & Any, T?>>, java/lang/Class<out ft<T & Any, T?>>?>
|
||||
type: ft<java/lang/Class<out T!>, java/lang/Class<out T!>?>
|
||||
symbolKind: LOCAL
|
||||
typeParameters: []
|
||||
getContainingFileSymbol: null
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ override operator fun iterator(): kotlin.collections.MutableIterator<test.SomeCl
|
||||
|
||||
fun toArray(): kotlin.Array<kotlin.Any!>!
|
||||
|
||||
fun <T : kotlin.Any!> toArray(p0: kotlin.Array<(T & kotlin.Any..T?)>!): kotlin.Array<(T & kotlin.Any..T?)>!
|
||||
fun <T : kotlin.Any!> toArray(p0: kotlin.Array<T!>!): kotlin.Array<T!>!
|
||||
|
||||
override fun add(p0: test.SomeClass!): kotlin.Boolean
|
||||
|
||||
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
Resolved to:
|
||||
0: (in java.util) <T : kotlin.Any!> Comparator(function: (T!, T!) -> kotlin.Int): java.util.Comparator<T>
|
||||
@@ -1,2 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in java.util) <T : kotlin.Any!> Comparator(function: ((T & kotlin.Any..T?), (T & kotlin.Any..T?)) -> kotlin.Int): java.util.Comparator<T>
|
||||
0: (in java.util) <T : kotlin.Any!> Comparator(function: (T!, T!) -> kotlin.Int): java.util.Comparator<T>
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
Resolved to:
|
||||
0: (in java.util) <T : kotlin.Any!> Comparator(function: (T!, T!) -> kotlin.Int): java.util.Comparator<T>
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in java.util) <T : kotlin.Any!> Comparator(function: ((T & kotlin.Any..T?), (T & kotlin.Any..T?)) -> kotlin.Int): java.util.Comparator<T>
|
||||
0: (in java.util) <T : kotlin.Any!> Comparator(function: (T!, T!) -> kotlin.Int): java.util.Comparator<T>
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
Resolved to:
|
||||
0: (in java.util) open class HashMap<K : kotlin.Any!, V : kotlin.Any!> : java.util.AbstractMap<K!, V!>(), kotlin.Cloneable, java.io.Serializable, kotlin.collections.MutableMap<K, V>
|
||||
@@ -1,2 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in java.util) open class HashMap<K : kotlin.Any!, V : kotlin.Any!> : java.util.AbstractMap<(K & kotlin.Any..K?), (V & kotlin.Any..V?)>(), kotlin.Cloneable, java.io.Serializable, kotlin.collections.MutableMap<K, V>
|
||||
0: (in java.util) open class HashMap<K : kotlin.Any!, V : kotlin.Any!> : java.util.AbstractMap<K!, V!>(), kotlin.Cloneable, java.io.Serializable, kotlin.collections.MutableMap<K, V>
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
Resolved to:
|
||||
0: (in java.util) open class HashSet<E : kotlin.Any!> : java.util.AbstractSet<E!>(), kotlin.Cloneable, java.io.Serializable, kotlin.collections.MutableSet<E>
|
||||
@@ -1,2 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in java.util) open class HashSet<E : kotlin.Any!> : java.util.AbstractSet<(E & kotlin.Any..E?)>(), kotlin.Cloneable, java.io.Serializable, kotlin.collections.MutableSet<E>
|
||||
0: (in java.util) open class HashSet<E : kotlin.Any!> : java.util.AbstractSet<E!>(), kotlin.Cloneable, java.io.Serializable, kotlin.collections.MutableSet<E>
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
constructor(c: kotlin.collections.(Mutable)Collection<out (E & kotlin.Any..E?)>!)
|
||||
constructor(c: kotlin.collections.(Mutable)Collection<out E!>!)
|
||||
+1
-1
@@ -39,7 +39,7 @@ KtConstructorSymbol:
|
||||
receiverParameter: null
|
||||
returnType: KtFlexibleType:
|
||||
annotationsList: []
|
||||
type: ft<kotlin/collections/MutableCollection<out ft<E & Any, E?>>, kotlin/collections/Collection<out ft<E & Any, E?>>?>
|
||||
type: ft<kotlin/collections/MutableCollection<out E!>, kotlin/collections/Collection<out E!>?>
|
||||
symbolKind: LOCAL
|
||||
typeParameters: []
|
||||
getContainingFileSymbol: null
|
||||
|
||||
-50
@@ -1,50 +0,0 @@
|
||||
PsiJetFileStubImpl[package=test]
|
||||
KotlinStub$PACKAGE_DIRECTIVE
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=test]
|
||||
KotlinStub$IMPORT_LIST
|
||||
KotlinStub$CLASS[classId=test/OuterClassesWithFlexibleArgs, fqName=test.OuterClassesWithFlexibleArgs, isEnumEntry=false, isInterface=false, isLocal=false, isTopLevel=true, name=OuterClassesWithFlexibleArgs, superNames=[]]
|
||||
KotlinStub$MODIFIER_LIST[public final]
|
||||
KotlinStub$TYPE_PARAMETER_LIST
|
||||
KotlinStub$TYPE_PARAMETER[fqName=null, isInVariance=false, isOutVariance=false, name=K]
|
||||
KotlinStub$TYPE_PARAMETER[fqName=null, isInVariance=false, isOutVariance=false, name=L]
|
||||
KotlinStub$PRIMARY_CONSTRUCTOR[fqName=null, hasBody=false, isDelegatedCallToThis=false, isExplicitDelegationCall=false, isExtension=false, isTopLevel=false, name=OuterClassesWithFlexibleArgs]
|
||||
KotlinStub$MODIFIER_LIST[public]
|
||||
KotlinStub$VALUE_PARAMETER_LIST
|
||||
KotlinStub$VALUE_PARAMETER[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=k]
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
KotlinStub$USER_TYPE
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=K]
|
||||
KotlinStub$VALUE_PARAMETER[fqName=null, hasDefaultValue=false, hasValOrVar=false, isMutable=false, name=l]
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
KotlinStub$USER_TYPE
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=L]
|
||||
KotlinStub$CLASS_BODY
|
||||
KotlinStub$PROPERTY[fqName=test.OuterClassesWithFlexibleArgs.baz, hasDelegate=false, hasDelegateExpression=false, hasInitializer=false, hasReturnTypeRef=true, isExtension=false, isTopLevel=false, isVar=false, name=baz]
|
||||
KotlinStub$MODIFIER_LIST[public final]
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
KotlinStub$USER_TYPE ft: d.JavaClass.InnerClass<L & Any .. L?>?
|
||||
KotlinStub$USER_TYPE
|
||||
KotlinStub$USER_TYPE
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=d]
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=JavaClass]
|
||||
KotlinStub$TYPE_ARGUMENT_LIST
|
||||
KotlinStub$TYPE_PROJECTION[projectionKind=NONE]
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
KotlinStub$INTERSECTION_TYPE
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
KotlinStub$USER_TYPE ft: K?
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=K]
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
KotlinStub$USER_TYPE
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=Any]
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=InnerClass]
|
||||
KotlinStub$TYPE_ARGUMENT_LIST
|
||||
KotlinStub$TYPE_PROJECTION[projectionKind=NONE]
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
KotlinStub$INTERSECTION_TYPE
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
KotlinStub$USER_TYPE ft: L?
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=L]
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
KotlinStub$USER_TYPE
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=Any]
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
/* Java interop */
|
||||
// KNM_K2_IGNORE
|
||||
|
||||
|
||||
+5
-15
@@ -56,7 +56,7 @@ KotlinStub$CLASS[classId=test/TypeParametersInFlexibleTypes, fqName=test.TypePar
|
||||
KotlinStub$PROPERTY[fqName=test.TypeParametersInFlexibleTypes.bar, hasDelegate=false, hasDelegateExpression=false, hasInitializer=false, hasReturnTypeRef=true, isExtension=false, isTopLevel=false, isVar=false, name=bar]
|
||||
KotlinStub$MODIFIER_LIST[public final]
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
KotlinStub$USER_TYPE ft: kotlin.collections.Collection<A & Any .. A?>?
|
||||
KotlinStub$USER_TYPE ft: kotlin.collections.Collection<A .. A?>?
|
||||
KotlinStub$USER_TYPE
|
||||
KotlinStub$USER_TYPE
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=kotlin]
|
||||
@@ -65,13 +65,8 @@ KotlinStub$CLASS[classId=test/TypeParametersInFlexibleTypes, fqName=test.TypePar
|
||||
KotlinStub$TYPE_ARGUMENT_LIST
|
||||
KotlinStub$TYPE_PROJECTION[projectionKind=NONE]
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
KotlinStub$INTERSECTION_TYPE
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
KotlinStub$USER_TYPE ft: A?
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=A]
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
KotlinStub$USER_TYPE
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=Any]
|
||||
KotlinStub$USER_TYPE ft: A?
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=A]
|
||||
KotlinStub$PROPERTY[fqName=test.TypeParametersInFlexibleTypes.baz, hasDelegate=false, hasDelegateExpression=false, hasInitializer=false, hasReturnTypeRef=true, isExtension=false, isTopLevel=false, isVar=false, name=baz]
|
||||
KotlinStub$MODIFIER_LIST[public final]
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
@@ -95,10 +90,5 @@ KotlinStub$CLASS[classId=test/TypeParametersInFlexibleTypes, fqName=test.TypePar
|
||||
KotlinStub$MODIFIER_LIST[public final]
|
||||
KotlinStub$VALUE_PARAMETER_LIST
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
KotlinStub$INTERSECTION_TYPE
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
KotlinStub$USER_TYPE ft: A?
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=A]
|
||||
KotlinStub$TYPE_REFERENCE
|
||||
KotlinStub$USER_TYPE
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=Any]
|
||||
KotlinStub$USER_TYPE ft: A?
|
||||
KotlinStub$REFERENCE_EXPRESSION[referencedName=A]
|
||||
Vendored
+1
-1
@@ -2,5 +2,5 @@ FILE: [ResolvedTo(BODY_RESOLVE)] functionWithImplicitType.kt
|
||||
public final [ResolvedTo(BODY_RESOLVE)] fun <[ResolvedTo(BODY_RESOLVE)] T> checkSubtype([ResolvedTo(BODY_RESOLVE)] t: R|T|): R|T| {
|
||||
^checkSubtype R|<local>/t|
|
||||
}
|
||||
public final [ResolvedTo(BODY_RESOLVE)] val ab: R|kotlin/collections/List<kotlin/Int>?| = R|/checkSubtype|<R|kotlin/collections/List<kotlin/Int>?|>(Q|java/util/Collections|.R|java/util/Collections.emptyList|<R|kotlin/Int|>())
|
||||
public final [ResolvedTo(BODY_RESOLVE)] val ab: R|kotlin/collections/List<kotlin/Int>?| = R|/checkSubtype|<R|kotlin/collections/List<kotlin/Int>?|>(Q|java/util/Collections|.R|java/util/Collections.emptyList|<R|kotlin/Int!|>())
|
||||
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/collections/List<kotlin/Int>?|
|
||||
|
||||
+1
-1
@@ -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| }
|
||||
}
|
||||
))
|
||||
|
||||
Vendored
+1
-1
@@ -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|)
|
||||
}
|
||||
|
||||
+2
-2
@@ -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|>()
|
||||
|
||||
+2
-2
@@ -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
-1
@@ -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|)
|
||||
}
|
||||
|
||||
+2
-2
@@ -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
|
||||
)
|
||||
)
|
||||
)<!>
|
||||
)
|
||||
}
|
||||
|
||||
+2
-2
@@ -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
-1
@@ -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
-1
@@ -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
-1
@@ -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|()
|
||||
}
|
||||
)
|
||||
|
||||
Vendored
+4
-4
@@ -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]
|
||||
|
||||
|
||||
+13
-13
@@ -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|
|
||||
}
|
||||
|
||||
compiler/fir/analysis-tests/testData/resolve/smartcasts/problems/smartcastToStarProjectedSubclass.kt
Vendored
+1
-1
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -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|) -> {
|
||||
|
||||
+1
-1
@@ -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|))
|
||||
}
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ FILE: concurrentMapOfAliases.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
private final val foo: R|java/util/concurrent/ConcurrentHashMap<kotlin/String, kotlin/CharSequence>| = Q|java/util/concurrent|.R|java/util/concurrent/ConcurrentHashMap.ConcurrentHashMap|<R|kotlin/String|, R|kotlin/CharSequence|>()
|
||||
private get(): R|java/util/concurrent/ConcurrentHashMap<kotlin/String, kotlin/CharSequence>|
|
||||
private final val foo: R|java/util/concurrent/ConcurrentHashMap<kotlin/String!, kotlin/CharSequence!>| = Q|java/util/concurrent|.R|java/util/concurrent/ConcurrentHashMap.ConcurrentHashMap|<R|kotlin/String!|, R|kotlin/CharSequence!|>()
|
||||
private get(): R|java/util/concurrent/ConcurrentHashMap<kotlin/String!, kotlin/CharSequence!>|
|
||||
|
||||
private final fun bar(): R|kotlin/Unit| {
|
||||
this@R|/A|.R|/A.foo|.R|SubstitutionOverride<java/util/concurrent/ConcurrentHashMap.get: R|@EnhancedNullability kotlin/CharSequence?|>|(String(dd))?.{ (this@R|/A|, $subj$).R|/A.baz|() }
|
||||
|
||||
Vendored
+1
-1
@@ -7,7 +7,7 @@ FILE: use.kt
|
||||
}
|
||||
public abstract interface PersistentStateComponent<T> : R|kotlin/Any| {
|
||||
}
|
||||
public final fun <T> deserializeAndLoadState(component: R|PersistentStateComponent<T>|, clazz: R|java/lang/Class<T>| = Q|ComponentSerializationUtil|.R|/ComponentSerializationUtil.getStateClass*s|<R|ft<T & Any, T?>|>(<getClass>(R|<local>/component|).R|kotlin/jvm/java|<R|CapturedType(out PersistentStateComponent<T>)|>)): R|kotlin/Unit| {
|
||||
public final fun <T> deserializeAndLoadState(component: R|PersistentStateComponent<T>|, clazz: R|java/lang/Class<T>| = Q|ComponentSerializationUtil|.R|/ComponentSerializationUtil.getStateClass*s|<R|T!|>(<getClass>(R|<local>/component|).R|kotlin/jvm/java|<R|CapturedType(out PersistentStateComponent<T>)|>)): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun use(beforeRunTask: R|BeforeRunTask<*>|): R|kotlin/Unit| {
|
||||
when () {
|
||||
|
||||
+1
-1
@@ -4,5 +4,5 @@ FILE: main.kt
|
||||
public final typealias ImmutableLinkedHashSet<E> = R|imm/LinkedHashSet<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|): R|kotlin/Unit| {
|
||||
this@R|/put|.R|SubstitutionOverride<imm/Map.get: R|ft<imm/Option<ft<ImmutableSet<V>, ImmutableSet<V>?>>, imm/Option<ft<ImmutableSet<V>, ImmutableSet<V>?>>?>|>|(R|<local>/key|).R|SubstitutionOverride<imm/Option.getOrElse: R|ft<ImmutableSet<V>, ImmutableSet<V>?>|>|(Q|ImmutableLinkedHashSet|.R|imm/LinkedHashSet.empty*s|<R|V|>())
|
||||
this@R|/put|.R|SubstitutionOverride<imm/Map.get: R|ft<imm/Option<ft<ImmutableSet<V>, ImmutableSet<V>?>>, imm/Option<ft<ImmutableSet<V>, ImmutableSet<V>?>>?>|>|(R|<local>/key|).R|SubstitutionOverride<imm/Option.getOrElse: R|ft<ImmutableSet<V>, ImmutableSet<V>?>|>|(Q|ImmutableLinkedHashSet|.R|imm/LinkedHashSet.empty*s|<R|V!|>())
|
||||
}
|
||||
|
||||
compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/genericGetterForSyntheticProperty.fir.txt
Vendored
+1
-1
@@ -3,5 +3,5 @@ FILE: test.kt
|
||||
lval foo: <ERROR TYPE REF: Unresolved name: foo> = R|<local>/some|.<Unresolved name: foo>#
|
||||
lval baz: <ERROR TYPE REF: Unresolved name: foo> = R|<local>/some|.<Unresolved name: foo>#<R|kotlin/String|>
|
||||
lval getFoo: <ERROR TYPE REF: Cannot infer argument for type parameter T> = R|<local>/some|.R|/Some.getFoo<CS errors: /Some.getFoo>#|<<ERROR TYPE REF: Cannot infer argument for type parameter T>>()
|
||||
lval getBaz: R|kotlin/String!| = R|<local>/some|.R|/Some.getFoo|<R|kotlin/String|>()
|
||||
lval getBaz: R|kotlin/String!| = R|<local>/some|.R|/Some.getFoo|<R|kotlin/String!|>()
|
||||
}
|
||||
|
||||
+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| <inline=NoInline> {
|
||||
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| <inline=NoInline> {
|
||||
^ Int(1)
|
||||
}
|
||||
)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
FILE: NamedParameterInConcurrentMap.kt
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
lval map: R|java/util/concurrent/ConcurrentHashMap<kotlin/String, kotlin/String>| = R|java/util/concurrent/ConcurrentHashMap.ConcurrentHashMap|<R|kotlin/String|, R|kotlin/String|>()
|
||||
lval map: R|java/util/concurrent/ConcurrentHashMap<kotlin/String!, kotlin/String!>| = R|java/util/concurrent/ConcurrentHashMap.ConcurrentHashMap|<R|kotlin/String!|, R|kotlin/String!|>()
|
||||
R|<local>/map|.R|SubstitutionOverride<java/util/concurrent/ConcurrentHashMap.put: R|@EnhancedNullability kotlin/String?|>|(key = String(key), value = String(value))
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ FILE: Main.kt
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
lvar generic: R|ft<Raw type Generic<kotlin/Any!>, Generic<*>?>| = Q|Generic|.R|/Generic.raw*s|
|
||||
lvar inner1: R|ft<Raw type Generic.Inner<kotlin/Any!>, Generic.Inner<*>?>| = R|<local>/generic|.R|SubstitutionOverride</Generic.inner>|
|
||||
R|<local>/inner1| = R|/Generic.Generic|<R|kotlin/String|>().R|SubstitutionOverride</Generic.Inner.Inner>|()
|
||||
R|<local>/inner1| = R|/Generic.Generic|<R|kotlin/String!|>().R|SubstitutionOverride</Generic.Inner.Inner>|()
|
||||
lvar inner2: R|ft<Raw type Generic.Inner<kotlin/Any!>, Generic.Inner<*>?>| = R|<local>/generic|.R|SubstitutionOverride</Generic.rawInner>|
|
||||
R|<local>/inner2| = R|/Generic.Generic|<R|kotlin/String|>().R|SubstitutionOverride</Generic.Inner.Inner>|()
|
||||
R|<local>/inner2| = R|/Generic.Generic|<R|kotlin/String!|>().R|SubstitutionOverride</Generic.Inner.Inner>|()
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
FILE: weakHashMap.kt
|
||||
public final val someMap: R|java/util/WeakHashMap<kotlin/Any?, kotlin/Any?>| = R|java/util/WeakHashMap.WeakHashMap|<R|kotlin/Any?|, R|kotlin/Any?|>()
|
||||
public get(): R|java/util/WeakHashMap<kotlin/Any?, kotlin/Any?>|
|
||||
public final val someMap: R|java/util/WeakHashMap<kotlin/Any!, kotlin/Any!>| = R|java/util/WeakHashMap.WeakHashMap|<R|kotlin/Any!|, R|kotlin/Any!|>()
|
||||
public get(): R|java/util/WeakHashMap<kotlin/Any!, kotlin/Any!>|
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
R|/someMap|.R|SubstitutionOverride<java/util/WeakHashMap.get: R|@EnhancedNullability kotlin/Any?|>|(String())
|
||||
}
|
||||
|
||||
+2
-2
@@ -9,9 +9,9 @@ FILE: typeAliasWithForEach.kt
|
||||
}
|
||||
public final typealias Arguments = R|kotlin/collections/Map<kotlin/String, ArgsInfo>|
|
||||
public final fun R|Arguments|.deepCopy(): R|Arguments| {
|
||||
lval result: R|java/util/HashMap<kotlin/String, ArgsInfo>| = R|java/util/HashMap.HashMap|<R|kotlin/String|, R|ArgsInfo|>()
|
||||
lval result: R|java/util/HashMap<kotlin/String!, ArgsInfo!>| = R|java/util/HashMap.HashMap|<R|kotlin/String!|, R|ArgsInfo!|>()
|
||||
this@R|/deepCopy|.R|SubstitutionOverride<kotlin/collections/Map.forEach: R|kotlin/Unit|>|(<L> = SAM(forEach@fun <anonymous>(key: R|@EnhancedNullability kotlin/String|, value: R|@EnhancedNullability ArgsInfo|): R|kotlin/Unit| <inline=NoInline> {
|
||||
R|<local>/result|.R|kotlin/collections/set|<R|kotlin/String|, R|ArgsInfo|>(R|<local>/key|, R|/ArgsInfoImpl.ArgsInfoImpl|(R|<local>/value|))
|
||||
R|<local>/result|.R|kotlin/collections/set|<R|kotlin/String!|, R|ArgsInfo!|>(R|<local>/key|, R|/ArgsInfoImpl.ArgsInfoImpl|(R|<local>/value|))
|
||||
Unit
|
||||
}
|
||||
))
|
||||
|
||||
@@ -110,19 +110,7 @@ private fun JavaType?.toConeTypeProjection(
|
||||
}
|
||||
val upperBound = toConeKotlinTypeForFlexibleBound(session, javaTypeParameterStack, mode, attributes, lowerBound)
|
||||
|
||||
val finalLowerBound = when (lowerBound) {
|
||||
is ConeTypeParameterType ->
|
||||
ConeDefinitelyNotNullType.create(
|
||||
lowerBound, session.typeContext,
|
||||
// Upper bounds might be not initialized properly yet, so we force creating DefinitelyNotNullType
|
||||
// It should not affect semantics, since it would be still a valid type anyway
|
||||
avoidComprehensiveCheck = true,
|
||||
) ?: lowerBound
|
||||
|
||||
else -> lowerBound
|
||||
}
|
||||
|
||||
if (isRaw) ConeRawType.create(finalLowerBound, upperBound) else ConeFlexibleType(finalLowerBound, upperBound)
|
||||
if (isRaw) ConeRawType.create(lowerBound, upperBound) else ConeFlexibleType(lowerBound, upperBound)
|
||||
}
|
||||
|
||||
is JavaArrayType -> {
|
||||
|
||||
@@ -587,7 +587,7 @@ interface ConeInferenceContext : TypeSystemInferenceExtensionContext, ConeTypeCo
|
||||
return intersectionType.withAlternative(secondCandidate)
|
||||
}
|
||||
|
||||
override fun useRefinedBoundsForTypeVariableInFlexiblePosition(): Boolean = true
|
||||
override fun useRefinedBoundsForTypeVariableInFlexiblePosition(): Boolean = false
|
||||
|
||||
override fun KotlinTypeMarker.convertToNonRaw(): KotlinTypeMarker {
|
||||
require(this is ConeKotlinType)
|
||||
|
||||
+28
-1
@@ -15,6 +15,7 @@ import org.jetbrains.kotlin.fir.resolve.inference.model.ConeExplicitTypeParamete
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.substitutorByMap
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.toConeType
|
||||
import org.jetbrains.kotlin.fir.symbols.ConeTypeParameterLookupTag
|
||||
import org.jetbrains.kotlin.fir.symbols.lazyResolveToPhase
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
import org.jetbrains.kotlin.name.StandardClassIds
|
||||
@@ -55,7 +56,11 @@ internal object CreateFreshTypeVariableSubstitutorStage : ResolutionStage() {
|
||||
when (val typeArgument = candidate.typeArgumentMapping[index]) {
|
||||
is FirTypeProjectionWithVariance -> csBuilder.addEqualityConstraint(
|
||||
freshVariable.defaultType,
|
||||
typeArgument.typeRef.coneType.fullyExpandedType(context.session),
|
||||
getTypePreservingFlexibilityWrtTypeVariable(
|
||||
typeArgument.typeRef.coneType,
|
||||
typeParameter,
|
||||
context.session
|
||||
).fullyExpandedType(context.session),
|
||||
ConeExplicitTypeParameterConstraintPosition(typeArgument)
|
||||
)
|
||||
is FirStarProjection -> csBuilder.addEqualityConstraint(
|
||||
@@ -76,6 +81,28 @@ internal object CreateFreshTypeVariableSubstitutorStage : ResolutionStage() {
|
||||
sink.yieldIfNeed()
|
||||
}
|
||||
}
|
||||
|
||||
private fun getTypePreservingFlexibilityWrtTypeVariable(
|
||||
type: ConeKotlinType,
|
||||
typeParameter: FirTypeParameterRef,
|
||||
session: FirSession,
|
||||
): ConeKotlinType {
|
||||
return if (typeParameter.shouldBeFlexible(session.typeContext)) {
|
||||
val notNullType = type.withNullability(ConeNullability.NOT_NULL, session.typeContext) as ConeSimpleKotlinType
|
||||
ConeFlexibleType(notNullType, notNullType.withNullability(ConeNullability.NULLABLE, session.typeContext))
|
||||
} else {
|
||||
type
|
||||
}
|
||||
}
|
||||
|
||||
private fun FirTypeParameterRef.shouldBeFlexible(context: ConeTypeContext): Boolean {
|
||||
return symbol.resolvedBounds.any {
|
||||
val type = it.coneType
|
||||
type is ConeFlexibleType || with(context) {
|
||||
(type.typeConstructor() as? ConeTypeParameterLookupTag)?.symbol?.fir?.shouldBeFlexible(context) ?: false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun createToFreshVariableSubstitutorAndAddInitialConstraints(
|
||||
|
||||
+8
-6
@@ -8,9 +8,8 @@ package org.jetbrains.kotlin.fir.resolve.inference
|
||||
import org.jetbrains.kotlin.fir.declarations.FirAnonymousFunction
|
||||
import org.jetbrains.kotlin.fir.resolve.inference.model.ConeArgumentConstraintPosition
|
||||
import org.jetbrains.kotlin.fir.resolve.inference.model.ConeFixVariableConstraintPosition
|
||||
import org.jetbrains.kotlin.fir.types.ConeKotlinType
|
||||
import org.jetbrains.kotlin.fir.types.coneType
|
||||
import org.jetbrains.kotlin.fir.types.coneTypeSafe
|
||||
import org.jetbrains.kotlin.fir.symbols.ConeTypeParameterLookupTag
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
import org.jetbrains.kotlin.name.StandardClassIds
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemUtilContext
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.components.PostponedArgumentInputTypesResolver
|
||||
@@ -22,9 +21,12 @@ import org.jetbrains.kotlin.types.model.TypeVariableMarker
|
||||
|
||||
object ConeConstraintSystemUtilContext : ConstraintSystemUtilContext {
|
||||
override fun TypeVariableMarker.shouldBeFlexible(): Boolean {
|
||||
// In FIR, there's no need in hack with shouldTryUseDifferentFlexibilityForUpperType
|
||||
// See org.jetbrains.kotlin.types.model.TypeSystemInferenceExtensionContext.useRefinedBoundsForTypeVariableInFlexiblePosition
|
||||
return false
|
||||
if (this !is ConeTypeVariable) return false
|
||||
val typeParameter =
|
||||
(this.typeConstructor.originalTypeParameter as? ConeTypeParameterLookupTag)?.typeParameterSymbol?.fir ?: return false
|
||||
|
||||
// TODO: Take a look at org.jetbrains.kotlin.resolve.calls.components.CreateFreshVariablesSubstitutor.shouldBeFlexible
|
||||
return typeParameter.bounds.any { it.coneType is ConeFlexibleType }
|
||||
}
|
||||
|
||||
override fun TypeVariableMarker.hasOnlyInputTypesAttribute(): Boolean {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ FILE fqName:<root> fileName:/box.kt
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (filter: @[FlexibleNullability] <root>.Condition<in @[FlexibleNullability] kotlin.String?>?) declared in <root>.J' type=<root>.J origin=null
|
||||
filter: TYPE_OP type=<root>.Condition<kotlin.Any?>? origin=SAM_CONVERSION typeOperand=<root>.Condition<kotlin.Any?>?
|
||||
TYPE_OP type=kotlin.Function1<@[FlexibleNullability] kotlin.Any?, kotlin.Boolean>? origin=IMPLICIT_CAST typeOperand=kotlin.Function1<@[FlexibleNullability] kotlin.Any?, kotlin.Boolean>?
|
||||
TYPE_OP type=kotlin.Function1<kotlin.Any?, kotlin.Boolean>? origin=IMPLICIT_CAST typeOperand=kotlin.Function1<kotlin.Any?, kotlin.Boolean>?
|
||||
GET_VAR 'filter: kotlin.Function1<kotlin.String, kotlin.Boolean>? declared in <root>.foo' type=kotlin.Function1<kotlin.String, kotlin.Boolean>? origin=null
|
||||
RETURN type=kotlin.Nothing from='public final fun foo (filter: kotlin.Function1<kotlin.String, kotlin.Boolean>?): kotlin.String declared in <root>'
|
||||
CONST String type=kotlin.String value="OK"
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ FILE: Eq.kt
|
||||
public get(): R|lib/a/A<R, S>|
|
||||
|
||||
public open override fun withL(l: R|kotlin/Int|): R|lib/a/C.WithL<R, S>| {
|
||||
^withL Q|lib/a/C|.R|lib/a/C.MyWithL.MyWithL|<R|R|, R|S|>()
|
||||
^withL Q|lib/a/C|.R|lib/a/C.MyWithL.MyWithL|<R|R!|, R|S!|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ fun <R> main(a: ReturnType<R>) {
|
||||
takeNullableStringAndKNullable(x1)
|
||||
takeNotNullStringAndNotNullK(<!ARGUMENT_TYPE_MISMATCH!>x1<!>)
|
||||
takeNullableStringAndNotNullK(<!ARGUMENT_TYPE_MISMATCH!>x1<!>)
|
||||
takeNotNullString(a.foo41.foo411)
|
||||
takeNotNullString(<!ARGUMENT_TYPE_MISMATCH!>a.foo41.foo411<!>)
|
||||
|
||||
val x2 = <!DEBUG_INFO_EXPRESSION_TYPE("ReturnType.A<kotlin.String?, R!!>..ReturnType.A<kotlin.String?, R!!>?!")!>a.foo2()<!>
|
||||
takeNotNullStringAndKNullable(<!ARGUMENT_TYPE_MISMATCH!>x2<!>)
|
||||
|
||||
Vendored
+1
-1
@@ -39,7 +39,7 @@ fun <R> main(a: ReturnTypeWithWarnings<R>) {
|
||||
takeNullableStringAndKNullable(x1)
|
||||
takeNotNullStringAndNotNullK(<!ARGUMENT_TYPE_MISMATCH!>x1<!>)
|
||||
takeNullableStringAndNotNullK(<!ARGUMENT_TYPE_MISMATCH!>x1<!>)
|
||||
takeNotNullString(a.foo41.foo411)
|
||||
takeNotNullString(<!ARGUMENT_TYPE_MISMATCH!>a.foo41.foo411<!>)
|
||||
|
||||
val x2 = <!DEBUG_INFO_EXPRESSION_TYPE("ReturnTypeWithWarnings.A<kotlin.String?, R!!>..ReturnTypeWithWarnings.A<kotlin.String?, R!!>?!")!>a.foo2()<!>
|
||||
takeNotNullStringAndKNullable(<!ARGUMENT_TYPE_MISMATCH!>x2<!>)
|
||||
|
||||
+3
-3
@@ -66,10 +66,10 @@ abstract class A<T> : Provider<T> {
|
||||
abstract class B<T> : Provider<T> {
|
||||
override fun get(): T & Any = null!!
|
||||
override fun getNullable(): T? = null!!
|
||||
override fun set(x: T & Any) {} // False positive in K1
|
||||
<!NOTHING_TO_OVERRIDE!>override<!> fun set(x: T & Any) {} // False positive in K1
|
||||
override fun setNullable(x: T?) {}
|
||||
|
||||
override fun getSet(x: T & Any): T & Any = x // False positive in K1
|
||||
<!NOTHING_TO_OVERRIDE!>override<!> fun getSet(x: T & Any): T & Any = x // False positive in K1
|
||||
override fun getSetNullable(x: T?): T? = x
|
||||
}
|
||||
|
||||
@@ -79,6 +79,6 @@ abstract class C<T> : Provider<T> {
|
||||
}
|
||||
|
||||
abstract class D<T> : Provider<T> {
|
||||
<!WRONG_NULLABILITY_FOR_JAVA_OVERRIDE!>override<!> fun getSet(x: T & Any): T = x<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!> // False positive in K1
|
||||
<!NOTHING_TO_OVERRIDE!>override<!> fun getSet(x: T & Any): T = x<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!> // False positive in K1
|
||||
override fun getSetNullable(x: T?): T = x!!
|
||||
}
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
// !LANGUAGE: +DefinitelyNonNullableTypes +ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated
|
||||
|
||||
// FILE: A.java
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
public interface A<T> {
|
||||
public T foo(T x) { return x; }
|
||||
@NotNull
|
||||
public T bar(@NotNull T x) {}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
interface B<T1> : A<T1> {
|
||||
override fun foo(x: T1): T1
|
||||
override fun bar(x: T1 & Any): T1 & Any
|
||||
}
|
||||
|
||||
interface C<T2> : A<T2> {
|
||||
override fun foo(x: T2 & Any): T2 & Any
|
||||
<!NOTHING_TO_OVERRIDE!>override<!> fun bar(x: T2): T2
|
||||
}
|
||||
|
||||
interface D : A<String?> {
|
||||
override fun foo(x: String?): String?
|
||||
override fun bar(x: String): String
|
||||
}
|
||||
|
||||
interface E : A<String> {
|
||||
override fun foo(x: String): String
|
||||
override fun bar(x: String): String
|
||||
}
|
||||
|
||||
interface F : A<String?> {
|
||||
override fun foo(x: String): String
|
||||
<!NOTHING_TO_OVERRIDE!>override<!> fun bar(x: String?): String?
|
||||
}
|
||||
|
||||
interface G<T3 : Any> : A<T3> {
|
||||
override fun foo(x: T3): T3
|
||||
override fun bar(x: T3): T3
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +DefinitelyNonNullableTypes +ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
+8
-8
@@ -73,14 +73,14 @@ fun test() {
|
||||
}
|
||||
val ret2 = build {
|
||||
emit(if (true) "" else null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String..kotlin.String?!")!>select2(get(), getIn())<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String..kotlin.String?!")!>select2(get(), Test.foo(getIn()))<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String..kotlin.String?!")!>select2(Test.foo(get()), Test.foo(getIn()))<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String..kotlin.String?!")!>select2(Test.foo(get()), getIn())<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String..kotlin.String?!")!>select3(get(), getIn())<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String..kotlin.String?!")!>select3(get(), Test.foo(getIn()))<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String..kotlin.String?!")!>select3(Test.foo(get()), Test.foo(getIn()))<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String..kotlin.String?!")!>select3(Test.foo(get()), getIn())<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>select2(get(), getIn())<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>select2(get(), Test.foo(getIn()))<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>select2(Test.foo(get()), Test.foo(getIn()))<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>select2(Test.foo(get()), getIn())<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>select3(get(), getIn())<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>select3(get(), Test.foo(getIn()))<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>select3(Test.foo(get()), Test.foo(getIn()))<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>select3(Test.foo(get()), getIn())<!>
|
||||
""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ val xExplicit: X = Test().findViewById(0)
|
||||
val xCast = Test().findViewById(0) as X
|
||||
|
||||
val xCastExplicitType = Test().findViewById<X>(0) as X
|
||||
val xSafeCastExplicitType = Test().findViewById<X>(0) <!USELESS_CAST!>as? X<!>
|
||||
val xSafeCastExplicitType = Test().findViewById<X>(0) as? X
|
||||
|
||||
val yExplicit: Y<String> = Test().findViewById(0)
|
||||
val yCast = Test().findViewById(0) as Y<String>
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ fun <K : Builder<K>> testTypeParam(builder: Builder<K>) {
|
||||
}
|
||||
|
||||
fun testStarJava(builder: JavaBuilder<*>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("CapturedType(*)!!..CapturedType(*)?!")!>builder.test()<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("CapturedType(*)..CapturedType(*)?!")!>builder.test()<!>
|
||||
|
||||
builder
|
||||
.test()
|
||||
|
||||
+2
-2
@@ -26,10 +26,10 @@ fun test() {
|
||||
}
|
||||
|
||||
fun testJava(appender: JavaWriterAppender) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("CapturedType(*)!!..CapturedType(*)?!")!>appender.newBuilder()<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("CapturedType(*)..CapturedType(*)?!")!>appender.newBuilder()<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("JavaWriterAppender.Builder1<CapturedType(*)>")!>appender.Builder1()<!>
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("CapturedType(*)!!..CapturedType(*)?!")!>appender.intersectTwoSelfTypes()<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("CapturedType(*)..CapturedType(*)?!")!>appender.intersectTwoSelfTypes()<!>
|
||||
}
|
||||
|
||||
object WriterAppender {
|
||||
|
||||
+6
-6
@@ -7,13 +7,13 @@ B2:
|
||||
[IntersectionOverride]: public open override fun remove(p0: R|@EnhancedNullability kotlin/Int|): R|kotlin/Boolean| from Use site scope of /B2 [id: 0]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun remove(p0: R|@EnhancedNullability kotlin/Int|): R|kotlin/Boolean| from Substitution scope for [Java enhancement scope for java/util/ArrayList] for type B2 [id: 1]
|
||||
[Enhancement]: public open fun remove(p0: R|@EnhancedNullability E|): R|kotlin/Boolean| from Java enhancement scope for java/util/ArrayList [id: 2]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun remove(p0: R|ft<E & Any, E?>|): R|kotlin/Boolean| from Substitution scope for [Java enhancement scope for java/util/AbstractList] for type java/util/ArrayList<E> [id: 3]
|
||||
[IntersectionOverride]: public open override fun remove(p0: R|ft<E & Any, E?>|): R|kotlin/Boolean| from Java enhancement scope for java/util/AbstractList [id: 4]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun remove(p0: R|ft<E & Any, E?>|): R|kotlin/Boolean| from Substitution scope for [Java enhancement scope for java/util/AbstractCollection] for type java/util/AbstractList<E> [id: 5]
|
||||
[Enhancement]: public open fun remove(p0: R|ft<E & Any, E?>|): R|kotlin/Boolean| from Java enhancement scope for java/util/AbstractCollection [id: 6]
|
||||
[SubstitutionOverride(DeclarationSite)]: public abstract override fun remove(element: R|ft<E & Any, E?>|): R|kotlin/Boolean| from Substitution scope for [Use site scope of kotlin/collections/MutableCollection] for type java/util/AbstractCollection<E> [id: 7]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun remove(p0: R|E!|): R|kotlin/Boolean| from Substitution scope for [Java enhancement scope for java/util/AbstractList] for type java/util/ArrayList<E> [id: 3]
|
||||
[IntersectionOverride]: public open override fun remove(p0: R|E!|): R|kotlin/Boolean| from Java enhancement scope for java/util/AbstractList [id: 4]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun remove(p0: R|E!|): R|kotlin/Boolean| from Substitution scope for [Java enhancement scope for java/util/AbstractCollection] for type java/util/AbstractList<E> [id: 5]
|
||||
[Enhancement]: public open fun remove(p0: R|E!|): R|kotlin/Boolean| from Java enhancement scope for java/util/AbstractCollection [id: 6]
|
||||
[SubstitutionOverride(DeclarationSite)]: public abstract override fun remove(element: R|E!|): R|kotlin/Boolean| from Substitution scope for [Use site scope of kotlin/collections/MutableCollection] for type java/util/AbstractCollection<E> [id: 7]
|
||||
[Library]: public abstract fun remove(element: R|E|): R|kotlin/Boolean| from Use site scope of kotlin/collections/MutableCollection [id: 8]
|
||||
[SubstitutionOverride(DeclarationSite)]: public abstract override fun remove(element: R|ft<E & Any, E?>|): R|kotlin/Boolean| from Substitution scope for [Use site scope of kotlin/collections/MutableList] for type java/util/AbstractList<E> [id: 9]
|
||||
[SubstitutionOverride(DeclarationSite)]: public abstract override fun remove(element: R|E!|): R|kotlin/Boolean| from Substitution scope for [Use site scope of kotlin/collections/MutableList] for type java/util/AbstractList<E> [id: 9]
|
||||
[Library]: public abstract fun remove(element: R|E|): R|kotlin/Boolean| from Use site scope of kotlin/collections/MutableList [id: 10]
|
||||
[SubstitutionOverride(DeclarationSite)]: public abstract override fun remove(element: R|E|): R|kotlin/Boolean| from Substitution scope for [Use site scope of kotlin/collections/MutableCollection] for type kotlin/collections/MutableList<E> [id: 11]
|
||||
[Library]: public abstract fun remove(element: R|E|): R|kotlin/Boolean| from Use site scope of kotlin/collections/MutableCollection [id: 8]
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
// ISSUE: KT-59138
|
||||
// SKIP_TXT
|
||||
// FILE: JavaClass.java
|
||||
public class JavaClass {
|
||||
public static <K> K simpleId(K k) { // fun <K> simpleId(k: K & Any..K?): K & Any..K? =
|
||||
return k;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun takeN(n: Number?): Int = 1
|
||||
|
||||
fun bar(n: Number?) {
|
||||
fun takeN(n: Number): String = ""
|
||||
|
||||
// in K1, it was resolved to nullable takeN
|
||||
// in K2, it would be resolved to not-nullable and may fail with NPE
|
||||
takeN(JavaClass.simpleId(n)).<!UNRESOLVED_REFERENCE!>div<!>(1)
|
||||
takeN(JavaClass.simpleId(n)).length
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-59138
|
||||
// SKIP_TXT
|
||||
// FILE: JavaClass.java
|
||||
|
||||
+3
-3
@@ -5,8 +5,8 @@ A:
|
||||
[Library]: public abstract fun removeAt(index: R|kotlin/Int|): R|E| from Use site scope of kotlin/collections/AbstractMutableList [id: 2]
|
||||
[SubstitutionOverride(DeclarationSite)]: public abstract override fun removeAt(index: R|kotlin/Int|): R|E| from Substitution scope for [Use site scope of kotlin/collections/MutableList] for type kotlin/collections/AbstractMutableList<E> [id: 3]
|
||||
[Library]: public abstract fun removeAt(index: R|kotlin/Int|): R|E| from Use site scope of kotlin/collections/MutableList [id: 4]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override operator fun removeAt(p0: R|kotlin/Int|): R|ft<E & Any, E?>| from Substitution scope for [Java enhancement scope for java/util/AbstractList] for type kotlin/collections/AbstractMutableList<E> [id: 5]
|
||||
[Enhancement]: public open operator fun removeAt(p0: R|kotlin/Int|): R|ft<E & Any, E?>| from Java enhancement scope for java/util/AbstractList [id: 6]
|
||||
[SubstitutionOverride(DeclarationSite)]: public abstract override fun removeAt(index: R|kotlin/Int|): R|ft<E & Any, E?>| from Substitution scope for [Use site scope of kotlin/collections/MutableList] for type java/util/AbstractList<E> [id: 7]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override operator fun removeAt(p0: R|kotlin/Int|): R|E!| from Substitution scope for [Java enhancement scope for java/util/AbstractList] for type kotlin/collections/AbstractMutableList<E> [id: 5]
|
||||
[Enhancement]: public open operator fun removeAt(p0: R|kotlin/Int|): R|E!| from Java enhancement scope for java/util/AbstractList [id: 6]
|
||||
[SubstitutionOverride(DeclarationSite)]: public abstract override fun removeAt(index: R|kotlin/Int|): R|E!| from Substitution scope for [Use site scope of kotlin/collections/MutableList] for type java/util/AbstractList<E> [id: 7]
|
||||
[Library]: public abstract fun removeAt(index: R|kotlin/Int|): R|E| from Use site scope of kotlin/collections/MutableList [id: 4]
|
||||
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@ D:
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun foo(x: R|kotlin/Int!|): R|kotlin/String!| from Use site scope of /D [id: 0]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun foo(x: R|kotlin/Int!|): R|kotlin/String!| from Use site scope of /C [id: 0]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun foo(x: R|kotlin/Int!|): R|kotlin/String!| from Substitution scope for [Java enhancement scope for /A] for type C [id: 0]
|
||||
[Enhancement]: public open fun foo(x: R|kotlin/Int!|): R|ft<T & Any, T?>| from Java enhancement scope for /A [id: 1]
|
||||
[Enhancement]: public open fun foo(x: R|kotlin/Int!|): R|T!| from Java enhancement scope for /A [id: 1]
|
||||
[Source]: public open fun foo(x: R|kotlin/Int|): R|kotlin/String| from Use site scope of /D [id: 0]
|
||||
[Source]: public open fun foo(x: R|kotlin/Int|): R|kotlin/String| from Use site scope of /B [id: 0]
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@ D:
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun foo(x: R|kotlin/Int!|): R|kotlin/String!| from Use site scope of /D [id: 0]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun foo(x: R|kotlin/Int!|): R|kotlin/String!| from Java enhancement scope for /C [id: 0]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun foo(x: R|kotlin/Int!|): R|kotlin/String!| from Substitution scope for [Java enhancement scope for /A] for type C [id: 0]
|
||||
[Enhancement]: public open fun foo(x: R|ft<T & Any, T?>|): R|kotlin/String!| from Java enhancement scope for /A [id: 1]
|
||||
[Enhancement]: public open fun foo(x: R|T!|): R|kotlin/String!| from Java enhancement scope for /A [id: 1]
|
||||
[Source]: public open fun foo(x: R|kotlin/Int|): R|kotlin/String| from Use site scope of /D [id: 0]
|
||||
[Source]: public open fun foo(x: R|kotlin/Int|): R|kotlin/String| from Use site scope of /B [id: 0]
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@ D:
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun foo(x: R|kotlin/Int!|): R|kotlin/String!| from Use site scope of /D [id: 0]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun foo(x: R|kotlin/Int!|): R|kotlin/String!| from Use site scope of /C [id: 0]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun foo(x: R|kotlin/Int!|): R|kotlin/String!| from Substitution scope for [Java enhancement scope for /A] for type C [id: 0]
|
||||
[Enhancement]: public open fun foo(x: R|ft<T & Any, T?>|): R|kotlin/String!| from Java enhancement scope for /A [id: 1]
|
||||
[Enhancement]: public open fun foo(x: R|T!|): R|kotlin/String!| from Java enhancement scope for /A [id: 1]
|
||||
[Source]: public open fun foo(x: R|kotlin/Int|): R|kotlin/String| from Use site scope of /D [id: 0]
|
||||
[Source]: public open fun foo(x: R|kotlin/Int|): R|kotlin/String| from Use site scope of /B [id: 0]
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ E:
|
||||
[IntersectionOverride]: public? open override fun foo(x: R|kotlin/Int|): R|kotlin/String| from Use site scope of /E [id: 0]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun foo(x: R|kotlin/Int!|): R|kotlin/String!| from Use site scope of /C [id: 1]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun foo(x: R|kotlin/Int!|): R|kotlin/String!| from Substitution scope for [Java enhancement scope for /A] for type C [id: 1]
|
||||
[Enhancement]: public open fun foo(x: R|ft<T & Any, T?>|): R|kotlin/String!| from Java enhancement scope for /A [id: 2]
|
||||
[Enhancement]: public open fun foo(x: R|T!|): R|kotlin/String!| from Java enhancement scope for /A [id: 2]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun foo(x: R|kotlin/Int|): R|kotlin/String| from Use site scope of /D [id: 3]
|
||||
[SubstitutionOverride(DeclarationSite)]: public open override fun foo(x: R|kotlin/Int|): R|kotlin/String| from Substitution scope for [Use site scope of /B] for type D [id: 3]
|
||||
[Source]: public open fun foo(x: R|T|): R|kotlin/String| from Use site scope of /B [id: 4]
|
||||
|
||||
Vendored
+1
-1
@@ -23,7 +23,7 @@ fun <V> SLRUMap<V>.getOrPut(value: V, l: List<V>) {
|
||||
|
||||
takeE(<!ARGUMENT_TYPE_MISMATCH!>value<!>)
|
||||
takeEList(<!ARGUMENT_TYPE_MISMATCH!>l<!>)
|
||||
takeE(id(value))
|
||||
takeE(<!ARGUMENT_TYPE_MISMATCH!>id(value)<!>)
|
||||
|
||||
if (value != null) {
|
||||
takeV(value)
|
||||
|
||||
+2
@@ -5,3 +5,5 @@
|
||||
/main.kt:(133,138): error: Argument type mismatch: actual type is 'V', but 'E & Any' was expected.
|
||||
|
||||
/main.kt:(154,155): error: Argument type mismatch: actual type is 'kotlin.collections.List<V>', but 'kotlin.collections.(Mutable)List<@NotNull() E & Any>' was expected.
|
||||
|
||||
/main.kt:(167,176): error: Argument type mismatch: actual type is 'V!', but 'E & Any' was expected.
|
||||
|
||||
Vendored
+1
-1
@@ -24,7 +24,7 @@ fun <V> SLRUMap<V>.getOrPut(value: V, l: List<V>) {
|
||||
|
||||
takeE(<!ARGUMENT_TYPE_MISMATCH!>value<!>)
|
||||
takeEList(<!ARGUMENT_TYPE_MISMATCH!>l<!>)
|
||||
takeE(id(value))
|
||||
takeE(<!ARGUMENT_TYPE_MISMATCH!>id(value)<!>)
|
||||
|
||||
if (value != null) {
|
||||
takeV(value)
|
||||
|
||||
+2
-2
@@ -31,12 +31,12 @@ public class Foo<T> {
|
||||
|
||||
// FILE: main.kt
|
||||
fun <T> bar(n: Number?, d: T, e: T) {
|
||||
val a: Number = Foo.simpleId(n)
|
||||
val a: Number = <!INITIALIZER_TYPE_MISMATCH!>Foo.simpleId(n)<!>
|
||||
val b: Number? = Foo.simpleId(n)
|
||||
val c = Foo.simpleId(n)
|
||||
|
||||
val x4 = Foo(if (true) 10 else null)
|
||||
val x5: Number = x4.produceT()
|
||||
val x5: Number = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH!>x4.produceT()<!>
|
||||
val x6: Number? = x4.produceT()
|
||||
val x7 = x4.produceT()
|
||||
val x8 = x4.produceNotNullT()
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
// ISSUE: KT-58933
|
||||
// FILE: J.java
|
||||
public interface J<T> {
|
||||
void simple(T t);
|
||||
void box(Box<T> box);
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
class Box<T>
|
||||
|
||||
class K<T> : J<T> {
|
||||
override fun simple(t: T & Any) {}
|
||||
override fun box(box: Box<T & Any>) {}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-58933
|
||||
// FILE: J.java
|
||||
public interface J<T> {
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@ interface Foo
|
||||
|
||||
fun test() {
|
||||
var nullable: Foo? = null
|
||||
val foo: Collection<Foo> = java.util.Collections.singleton(nullable)
|
||||
val foo: Collection<Foo> = <!INITIALIZER_TYPE_MISMATCH!>java.util.Collections.singleton(nullable)<!>
|
||||
val foo1: Collection<Foo> = java.util.Collections.singleton(nullable!!)
|
||||
}
|
||||
|
||||
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
// ISSUE: KT-57014
|
||||
// FULL_JDK
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
import java.util.function.Supplier
|
||||
|
||||
fun main() {
|
||||
val sam = Supplier<String> {
|
||||
<!ARGUMENT_TYPE_MISMATCH!>foo()<!>
|
||||
}
|
||||
}
|
||||
|
||||
fun foo(): String? = null
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-57014
|
||||
// FULL_JDK
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ FILE: test2.kt
|
||||
}
|
||||
FILE: test3.kt
|
||||
public final fun test3(): R|ft<kotlin/collections/MutableMap<kotlin/String!, kotlin/String!>, kotlin/collections/Map<kotlin/String!, kotlin/String!>?>| {
|
||||
^test3 Q|java/util/Map|.R|java/util/Map.of*s|<R|kotlin/String|, R|kotlin/String|>()
|
||||
^test3 Q|java/util/Map|.R|java/util/Map.of*s|<R|kotlin/String!|, R|kotlin/String!|>()
|
||||
}
|
||||
FILE: test4.kt
|
||||
public final fun test4(): R|kotlin/Int| {
|
||||
|
||||
+8
-8
@@ -40,15 +40,15 @@ FILE fqName:<root> fileName:/constructorWithOwnTypeParametersCall.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN name:testJava visibility:public modality:FINAL <> () returnType:<root>.J1.J2<kotlin.Double, kotlin.Int>
|
||||
FUN name:testJava visibility:public modality:FINAL <> () returnType:<root>.J1.J2<@[FlexibleNullability] kotlin.Double?, @[FlexibleNullability] kotlin.Int?>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun testJava (): <root>.J1.J2<kotlin.Double, kotlin.Int> declared in <root>'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> <Y2> () declared in <root>.J1.J2' type=<root>.J1.J2<kotlin.Double, kotlin.Int> origin=null
|
||||
<class: X2>: kotlin.Double
|
||||
<Y2>: kotlin.CharSequence
|
||||
$outer: CONSTRUCTOR_CALL 'public constructor <init> <Y1> () declared in <root>.J1' type=<root>.J1<kotlin.Int> origin=null
|
||||
<class: X1>: kotlin.Int
|
||||
<Y1>: kotlin.String
|
||||
RETURN type=kotlin.Nothing from='public final fun testJava (): <root>.J1.J2<@[FlexibleNullability] kotlin.Double?, @[FlexibleNullability] kotlin.Int?> declared in <root>'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> <Y2> () declared in <root>.J1.J2' type=<root>.J1.J2<@[FlexibleNullability] kotlin.Double?, @[FlexibleNullability] kotlin.Int?> origin=null
|
||||
<class: X2>: @[FlexibleNullability] kotlin.Double?
|
||||
<Y2>: @[FlexibleNullability] kotlin.CharSequence?
|
||||
$outer: CONSTRUCTOR_CALL 'public constructor <init> <Y1> () declared in <root>.J1' type=<root>.J1<@[FlexibleNullability] kotlin.Int?> origin=null
|
||||
<class: X1>: @[FlexibleNullability] kotlin.Int?
|
||||
<Y1>: @[FlexibleNullability] kotlin.String?
|
||||
FUN name:testKotlin visibility:public modality:FINAL <> () returnType:<root>.K1.K2<kotlin.String, kotlin.Int>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun testKotlin (): <root>.K1.K2<kotlin.String, kotlin.Int> declared in <root>'
|
||||
|
||||
+2
-3
@@ -16,11 +16,10 @@ class K1<T1 : Number> {
|
||||
|
||||
}
|
||||
|
||||
fun testJava(): J2<Double, Int> {
|
||||
return J1<Int, String>().J2<Double, CharSequence>()
|
||||
fun testJava(): J2<@FlexibleNullability Double?, @FlexibleNullability Int?> {
|
||||
return J1<@FlexibleNullability Int?, @FlexibleNullability String?>().J2<@FlexibleNullability Double?, @FlexibleNullability CharSequence?>()
|
||||
}
|
||||
|
||||
fun testKotlin(): K2<String, Int> {
|
||||
return K1<Int>().K2<String>()
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
FILE fqName:<root> fileName:/samConversionToGeneric.kt
|
||||
FUN name:test1 visibility:public modality:FINAL <> () returnType:<root>.J<kotlin.String>
|
||||
FUN name:test1 visibility:public modality:FINAL <> () returnType:<root>.J<@[FlexibleNullability] kotlin.String?>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test1 (): <root>.J<kotlin.String> declared in <root>'
|
||||
TYPE_OP type=<root>.J<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.J<kotlin.String>
|
||||
RETURN type=kotlin.Nothing from='public final fun test1 (): <root>.J<@[FlexibleNullability] kotlin.String?> declared in <root>'
|
||||
TYPE_OP type=<root>.J<@[FlexibleNullability] kotlin.String?> origin=SAM_CONVERSION typeOperand=<root>.J<@[FlexibleNullability] kotlin.String?>
|
||||
FUN_EXPR type=kotlin.Function1<@[FlexibleNullability] kotlin.String?, @[FlexibleNullability] kotlin.String?> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (x:@[FlexibleNullability] kotlin.String?) returnType:@[FlexibleNullability] kotlin.String?
|
||||
VALUE_PARAMETER name:x index:0 type:@[FlexibleNullability] kotlin.String?
|
||||
|
||||
+2
-3
@@ -1,8 +1,8 @@
|
||||
fun test1(): J<String> {
|
||||
fun test1(): J<@FlexibleNullability String?> {
|
||||
return local fun <anonymous>(x: @FlexibleNullability String?): @FlexibleNullability String? {
|
||||
return x
|
||||
}
|
||||
/*-> J<String> */
|
||||
/*-> J<@FlexibleNullability String?> */
|
||||
}
|
||||
|
||||
fun test10(fn: Function1<Int, String>) {
|
||||
@@ -49,4 +49,3 @@ fun test8(efn: @ExtensionFunctionType Function1<String, String>): J<@FlexibleNul
|
||||
fun test9(efn: @ExtensionFunctionType Function1<String, String>) {
|
||||
bar<@FlexibleNullability String?>(j = efn /*-> J<@FlexibleNullability String?> */)
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ FILE fqName:<root> fileName:/AllCandidates.kt
|
||||
CALL 'public final fun apply <T> (block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.apply, kotlin.Unit>): T of kotlin.apply declared in kotlin' type=@[FlexibleNullability] <root>.OverloadResolutionResultsImpl<@[FlexibleNullability] A of <root>.allCandidatesResult?>? origin=null
|
||||
<T>: @[FlexibleNullability] <root>.OverloadResolutionResultsImpl<@[FlexibleNullability] A of <root>.allCandidatesResult?>?
|
||||
$receiver: CALL 'public open fun nameNotFound <R> (): @[FlexibleNullability] <root>.OverloadResolutionResultsImpl<@[FlexibleNullability] R of <root>.OverloadResolutionResultsImpl.nameNotFound?>? declared in <root>.OverloadResolutionResultsImpl' type=@[FlexibleNullability] <root>.OverloadResolutionResultsImpl<@[FlexibleNullability] A of <root>.allCandidatesResult?>? origin=null
|
||||
<R>: A of <root>.allCandidatesResult
|
||||
<R>: @[FlexibleNullability] A of <root>.allCandidatesResult?
|
||||
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<@[FlexibleNullability] <root>.OverloadResolutionResultsImpl<@[FlexibleNullability] A of <root>.allCandidatesResult?>?, kotlin.Unit> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:@[FlexibleNullability] <root>.OverloadResolutionResultsImpl<@[FlexibleNullability] A of <root>.allCandidatesResult?>?) returnType:kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER name:$this$apply type:@[FlexibleNullability] <root>.OverloadResolutionResultsImpl<@[FlexibleNullability] A of <root>.allCandidatesResult?>?
|
||||
|
||||
@@ -21,7 +21,7 @@ class ResolvedCall<C : Any?> {
|
||||
}
|
||||
|
||||
private fun <A : Any?> allCandidatesResult(allCandidates: Collection<MyCandidate>): @FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>? {
|
||||
return nameNotFound<A>().apply<@FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?>(block = local fun @FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?.<anonymous>() {
|
||||
return nameNotFound<@FlexibleNullability A?>().apply<@FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?>(block = local fun @FlexibleNullability OverloadResolutionResultsImpl<@FlexibleNullability A?>?.<anonymous>() {
|
||||
$this$apply.setAllCandidates(allCandidates = allCandidates.map<MyCandidate, ResolvedCall<A>>(transform = local fun <anonymous>(it: MyCandidate): ResolvedCall<A> {
|
||||
return it.<get-resolvedCall>() as ResolvedCall<A>
|
||||
}
|
||||
|
||||
+18
-18
@@ -1,29 +1,29 @@
|
||||
FILE fqName:<root> fileName:/javaConstructorWithTypeParameters.kt
|
||||
FUN name:test1 visibility:public modality:FINAL <> () returnType:<root>.J1<kotlin.Int>
|
||||
FUN name:test1 visibility:public modality:FINAL <> () returnType:<root>.J1<@[FlexibleNullability] kotlin.Int?>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test1 (): <root>.J1<kotlin.Int> declared in <root>'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.J1' type=<root>.J1<kotlin.Int> origin=null
|
||||
<class: T1>: kotlin.Int
|
||||
FUN name:test2 visibility:public modality:FINAL <> () returnType:<root>.J1<kotlin.Int>
|
||||
RETURN type=kotlin.Nothing from='public final fun test1 (): <root>.J1<@[FlexibleNullability] kotlin.Int?> declared in <root>'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.J1' type=<root>.J1<@[FlexibleNullability] kotlin.Int?> origin=null
|
||||
<class: T1>: @[FlexibleNullability] kotlin.Int?
|
||||
FUN name:test2 visibility:public modality:FINAL <> () returnType:<root>.J1<@[FlexibleNullability] kotlin.Int?>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test2 (): <root>.J1<kotlin.Int> declared in <root>'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> <X1> (x1: @[FlexibleNullability] X1 of <root>.J1.<init>?) declared in <root>.J1' type=<root>.J1<kotlin.Int> origin=null
|
||||
<class: T1>: kotlin.Int
|
||||
<X1>: kotlin.Int
|
||||
RETURN type=kotlin.Nothing from='public final fun test2 (): <root>.J1<@[FlexibleNullability] kotlin.Int?> declared in <root>'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> <X1> (x1: @[FlexibleNullability] X1 of <root>.J1.<init>?) declared in <root>.J1' type=<root>.J1<@[FlexibleNullability] kotlin.Int?> origin=null
|
||||
<class: T1>: @[FlexibleNullability] kotlin.Int?
|
||||
<X1>: @[FlexibleNullability] kotlin.Int?
|
||||
x1: CONST Int type=kotlin.Int value=1
|
||||
FUN name:test3 visibility:public modality:FINAL <> (j1:<root>.J1<kotlin.Any>) returnType:<root>.J1.J2<kotlin.Int, kotlin.Any>
|
||||
FUN name:test3 visibility:public modality:FINAL <> (j1:<root>.J1<kotlin.Any>) returnType:<root>.J1.J2<@[FlexibleNullability] kotlin.Int?, kotlin.Any>
|
||||
VALUE_PARAMETER name:j1 index:0 type:<root>.J1<kotlin.Any>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test3 (j1: <root>.J1<kotlin.Any>): <root>.J1.J2<kotlin.Int, kotlin.Any> declared in <root>'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.J1.J2' type=<root>.J1.J2<kotlin.Int, kotlin.Any> origin=null
|
||||
<class: T2>: kotlin.Int
|
||||
RETURN type=kotlin.Nothing from='public final fun test3 (j1: <root>.J1<kotlin.Any>): <root>.J1.J2<@[FlexibleNullability] kotlin.Int?, kotlin.Any> declared in <root>'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.J1.J2' type=<root>.J1.J2<@[FlexibleNullability] kotlin.Int?, kotlin.Any> origin=null
|
||||
<class: T2>: @[FlexibleNullability] kotlin.Int?
|
||||
$outer: GET_VAR 'j1: <root>.J1<kotlin.Any> declared in <root>.test3' type=<root>.J1<kotlin.Any> origin=null
|
||||
FUN name:test4 visibility:public modality:FINAL <> (j1:<root>.J1<kotlin.Any>) returnType:<root>.J1.J2<kotlin.Int, kotlin.Any>
|
||||
FUN name:test4 visibility:public modality:FINAL <> (j1:<root>.J1<kotlin.Any>) returnType:<root>.J1.J2<@[FlexibleNullability] kotlin.Int?, kotlin.Any>
|
||||
VALUE_PARAMETER name:j1 index:0 type:<root>.J1<kotlin.Any>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test4 (j1: <root>.J1<kotlin.Any>): <root>.J1.J2<kotlin.Int, kotlin.Any> declared in <root>'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> <X2> (x2: @[FlexibleNullability] X2 of <root>.J1.J2.<init>?) declared in <root>.J1.J2' type=<root>.J1.J2<kotlin.Int, kotlin.Any> origin=null
|
||||
<class: T2>: kotlin.Int
|
||||
<X2>: kotlin.Int
|
||||
RETURN type=kotlin.Nothing from='public final fun test4 (j1: <root>.J1<kotlin.Any>): <root>.J1.J2<@[FlexibleNullability] kotlin.Int?, kotlin.Any> declared in <root>'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> <X2> (x2: @[FlexibleNullability] X2 of <root>.J1.J2.<init>?) declared in <root>.J1.J2' type=<root>.J1.J2<@[FlexibleNullability] kotlin.Int?, kotlin.Any> origin=null
|
||||
<class: T2>: @[FlexibleNullability] kotlin.Int?
|
||||
<X2>: @[FlexibleNullability] kotlin.Int?
|
||||
$outer: GET_VAR 'j1: <root>.J1<kotlin.Any> declared in <root>.test4' type=<root>.J1<kotlin.Any> origin=null
|
||||
x2: CONST Int type=kotlin.Int value=1
|
||||
|
||||
+8
-8
@@ -1,15 +1,15 @@
|
||||
fun test1(): J1<Int> {
|
||||
return J1<Int>()
|
||||
fun test1(): J1<@FlexibleNullability Int?> {
|
||||
return J1<@FlexibleNullability Int?>()
|
||||
}
|
||||
|
||||
fun test2(): J1<Int> {
|
||||
return J1<Int, Int>(x1 = 1)
|
||||
fun test2(): J1<@FlexibleNullability Int?> {
|
||||
return J1<@FlexibleNullability Int?, @FlexibleNullability Int?>(x1 = 1)
|
||||
}
|
||||
|
||||
fun test3(j1: J1<Any>): J2<Int, Any> {
|
||||
return j1.J2<Int>()
|
||||
fun test3(j1: J1<Any>): J2<@FlexibleNullability Int?, Any> {
|
||||
return j1.J2<@FlexibleNullability Int?>()
|
||||
}
|
||||
|
||||
fun test4(j1: J1<Any>): J2<Int, Any> {
|
||||
return j1.J2<Int, Int>(x2 = 1)
|
||||
fun test4(j1: J1<Any>): J2<@FlexibleNullability Int?, Any> {
|
||||
return j1.J2<@FlexibleNullability Int?, @FlexibleNullability Int?>(x2 = 1)
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
public abstract class ClassWithTypePExtendsIterableP<P : R|kotlin/Any!|> : R|kotlin/Any|, R|kotlin/collections/MutableIterable<ft<P & Any, P?>>| {
|
||||
public abstract class ClassWithTypePExtendsIterableP<P : R|kotlin/Any!|> : R|kotlin/Any|, R|kotlin/collections/MutableIterable<P!>| {
|
||||
public constructor<P : R|kotlin/Any!|>(): R|test/ClassWithTypePExtendsIterableP<P>|
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public final class ClassWithTypePP<P : R|kotlin/Any!|, Q : R|ft<P & Any, P?>|> : R|kotlin/Any| {
|
||||
public constructor<P : R|kotlin/Any!|, Q : R|ft<P & Any, P?>|>(): R|test/ClassWithTypePP<P, Q>|
|
||||
public final class ClassWithTypePP<P : R|kotlin/Any!|, Q : R|P!|> : R|kotlin/Any| {
|
||||
public constructor<P : R|kotlin/Any!|, Q : R|P!|>(): R|test/ClassWithTypePP<P, Q>|
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public open class ClassWithTypePRefNext<R : R|ft<kotlin/collections/MutableIterable<ft<P & Any, P?>>, kotlin/collections/Iterable<ft<P & Any, P?>>?>|, P : R|kotlin/Any!|> : R|kotlin/Any| {
|
||||
public constructor<R : R|ft<kotlin/collections/MutableIterable<ft<P & Any, P?>>, kotlin/collections/Iterable<ft<P & Any, P?>>?>|, P : R|kotlin/Any!|>(): R|test/ClassWithTypePRefNext<R, P>|
|
||||
public open class ClassWithTypePRefNext<R : R|ft<kotlin/collections/MutableIterable<P!>, kotlin/collections/Iterable<P!>?>|, P : R|kotlin/Any!|> : R|kotlin/Any| {
|
||||
public constructor<R : R|ft<kotlin/collections/MutableIterable<P!>, kotlin/collections/Iterable<P!>?>|, P : R|kotlin/Any!|>(): R|test/ClassWithTypePRefNext<R, P>|
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public final class ClassWithTypePRefSelf<P : R|ft<kotlin/Enum<ft<P & Any, P?>>, kotlin/Enum<ft<P & Any, P?>>?>|> : R|kotlin/Any| {
|
||||
public constructor<P : R|ft<kotlin/Enum<ft<P & Any, P?>>, kotlin/Enum<ft<P & Any, P?>>?>|>(): R|test/ClassWithTypePRefSelf<P>|
|
||||
public final class ClassWithTypePRefSelf<P : R|ft<kotlin/Enum<P!>, kotlin/Enum<P!>?>|> : R|kotlin/Any| {
|
||||
public constructor<P : R|ft<kotlin/Enum<P!>, kotlin/Enum<P!>?>|>(): R|test/ClassWithTypePRefSelf<P>|
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
public final class ClassWithTypePRefSelfAndClass<P : R|ft<test/ClassWithTypePRefSelfAndClass<ft<P & Any, P?>>, test/ClassWithTypePRefSelfAndClass<ft<P & Any, P?>>?>|> : R|kotlin/Any| {
|
||||
public constructor<P : R|ft<test/ClassWithTypePRefSelfAndClass<ft<P & Any, P?>>, test/ClassWithTypePRefSelfAndClass<ft<P & Any, P?>>?>|>(): R|test/ClassWithTypePRefSelfAndClass<P>|
|
||||
public final class ClassWithTypePRefSelfAndClass<P : R|ft<test/ClassWithTypePRefSelfAndClass<P!>, test/ClassWithTypePRefSelfAndClass<P!>?>|> : R|kotlin/Any| {
|
||||
public constructor<P : R|ft<test/ClassWithTypePRefSelfAndClass<P!>, test/ClassWithTypePRefSelfAndClass<P!>?>|>(): R|test/ClassWithTypePRefSelfAndClass<P>|
|
||||
|
||||
}
|
||||
|
||||
+4
-4
@@ -4,15 +4,15 @@ public final class InheritMethodsDifferentReturnTypesGeneric : R|kotlin/Any| {
|
||||
public abstract interface Sub : R|test/InheritMethodsDifferentReturnTypesGeneric.Super1<kotlin/String!, kotlin/CharSequence!>|, R|test/InheritMethodsDifferentReturnTypesGeneric.Super2<kotlin/CharSequence!, kotlin/String!>| {
|
||||
}
|
||||
public abstract interface Super1<F : R|kotlin/Any!|, B : R|kotlin/Any!|> : R|kotlin/Any| {
|
||||
public abstract fun foo(): R|ft<F & Any, F?>|
|
||||
public abstract fun foo(): R|F!|
|
||||
|
||||
public abstract fun bar(): R|ft<B & Any, B?>|
|
||||
public abstract fun bar(): R|B!|
|
||||
|
||||
}
|
||||
public abstract interface Super2<FF : R|kotlin/Any!|, BB : R|kotlin/Any!|> : R|kotlin/Any| {
|
||||
public abstract fun foo(): R|ft<FF & Any, FF?>|
|
||||
public abstract fun foo(): R|FF!|
|
||||
|
||||
public abstract fun bar(): R|ft<BB & Any, BB?>|
|
||||
public abstract fun bar(): R|BB!|
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
public open class InnerClassReferencesOuterTP<P : R|kotlin/Any!|> : R|kotlin/Any| {
|
||||
public constructor<P : R|kotlin/Any!|>(): R|test/InnerClassReferencesOuterTP<P>|
|
||||
|
||||
public open inner class Inner<Q : R|ft<P & Any, P?>|, Outer(P) : R|kotlin/Any!|> : R|kotlin/Any| {
|
||||
public test/InnerClassReferencesOuterTP<P>.constructor<Q : R|ft<P & Any, P?>|>(): R|test/InnerClassReferencesOuterTP.Inner<Q, P>|
|
||||
public open inner class Inner<Q : R|P!|, Outer(P) : R|kotlin/Any!|> : R|kotlin/Any| {
|
||||
public test/InnerClassReferencesOuterTP<P>.constructor<Q : R|P!|>(): R|test/InnerClassReferencesOuterTP.Inner<Q, P>|
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -11,12 +11,12 @@ public open class InnerClassTypeMultipleGeneric : R|kotlin/Any| {
|
||||
|
||||
}
|
||||
}
|
||||
public open inner class Outer<E1 : R|kotlin/Any!|, E2 : R|kotlin/Any!|> : R|test/InnerClassTypeMultipleGeneric.BaseOuter<kotlin/Int!, ft<E1 & Any, E1?>>| {
|
||||
public open fun bar(): R|ft<test/InnerClassTypeMultipleGeneric.BaseOuter.BaseInner<ft<java/lang/Class<*>, java/lang/Class<*>?>, kotlin/CharSequence!, kotlin/Int!, ft<E1 & Any, E1?>>, test/InnerClassTypeMultipleGeneric.BaseOuter.BaseInner<ft<java/lang/Class<*>, java/lang/Class<*>?>, kotlin/CharSequence!, kotlin/Int!, ft<E1 & Any, E1?>>?>|
|
||||
public open inner class Outer<E1 : R|kotlin/Any!|, E2 : R|kotlin/Any!|> : R|test/InnerClassTypeMultipleGeneric.BaseOuter<kotlin/Int!, E1!>| {
|
||||
public open fun bar(): R|ft<test/InnerClassTypeMultipleGeneric.BaseOuter.BaseInner<ft<java/lang/Class<*>, java/lang/Class<*>?>, kotlin/CharSequence!, kotlin/Int!, E1!>, test/InnerClassTypeMultipleGeneric.BaseOuter.BaseInner<ft<java/lang/Class<*>, java/lang/Class<*>?>, kotlin/CharSequence!, kotlin/Int!, E1!>?>|
|
||||
|
||||
public test/InnerClassTypeMultipleGeneric.constructor<E1 : R|kotlin/Any!|, E2 : R|kotlin/Any!|>(): R|test/InnerClassTypeMultipleGeneric.Outer<E1, E2>|
|
||||
|
||||
public open inner class Inner<E3 : R|kotlin/Any!|, Outer(E1) : R|kotlin/Any!|, Outer(E2) : R|kotlin/Any!|> : R|test/InnerClassTypeMultipleGeneric.BaseOuter.BaseInner<kotlin/Double!, kotlin/String!, ft<E2 & Any, E2?>, ft<E3 & Any, E3?>>| {
|
||||
public open inner class Inner<E3 : R|kotlin/Any!|, Outer(E1) : R|kotlin/Any!|, Outer(E2) : R|kotlin/Any!|> : R|test/InnerClassTypeMultipleGeneric.BaseOuter.BaseInner<kotlin/Double!, kotlin/String!, E2!, E3!>| {
|
||||
public test/InnerClassTypeMultipleGeneric.Outer<E1, E2>.constructor<E3 : R|kotlin/Any!|>(): R|test/InnerClassTypeMultipleGeneric.Outer.Inner<E3, E1, E2>|
|
||||
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ public open class InnerClassesInGeneric<P : R|kotlin/Any!|, Q : R|kotlin/Any!|>
|
||||
public test/InnerClassesInGeneric<P, Q>.constructor(): R|test/InnerClassesInGeneric.Inner<P, Q>|
|
||||
|
||||
}
|
||||
public open inner class Inner2<Outer(P) : R|kotlin/Any!|, Outer(Q) : R|kotlin/Any!|> : R|test/InnerClassesInGeneric.Inner<ft<P & Any, P?>, ft<Q & Any, Q?>>| {
|
||||
public open operator fun iterator(): R|ft<kotlin/collections/MutableIterator<ft<P & Any, P?>>, kotlin/collections/Iterator<ft<P & Any, P?>>?>|
|
||||
public open inner class Inner2<Outer(P) : R|kotlin/Any!|, Outer(Q) : R|kotlin/Any!|> : R|test/InnerClassesInGeneric.Inner<P!, Q!>| {
|
||||
public open operator fun iterator(): R|ft<kotlin/collections/MutableIterator<P!>, kotlin/collections/Iterator<P!>?>|
|
||||
|
||||
public test/InnerClassesInGeneric<P, Q>.constructor(): R|test/InnerClassesInGeneric.Inner2<P, Q>|
|
||||
|
||||
|
||||
@@ -4,23 +4,23 @@ public open class InnerOfGeneric : R|kotlin/Any| {
|
||||
public abstract inner class A<K : R|kotlin/Any!|> : R|kotlin/Any| {
|
||||
public test/InnerOfGeneric.constructor<K : R|kotlin/Any!|>(): R|test/InnerOfGeneric.A<K>|
|
||||
|
||||
public abstract inner class Inner<Outer(K) : R|kotlin/Any!|> : R|test/InnerOfGeneric.S<ft<K & Any, K?>>| {
|
||||
public abstract inner class Inner<Outer(K) : R|kotlin/Any!|> : R|test/InnerOfGeneric.S<K!>| {
|
||||
public test/InnerOfGeneric.A<K>.constructor(): R|test/InnerOfGeneric.A.Inner<K>|
|
||||
|
||||
}
|
||||
}
|
||||
public open inner class B<L : R|kotlin/Any!|> : R|test/InnerOfGeneric.A<ft<L & Any, L?>>| {
|
||||
public open inner class B<L : R|kotlin/Any!|> : R|test/InnerOfGeneric.A<L!>| {
|
||||
public test/InnerOfGeneric.constructor<L : R|kotlin/Any!|>(): R|test/InnerOfGeneric.B<L>|
|
||||
|
||||
public open inner class SubInner<Outer(L) : R|kotlin/Any!|> : R|test/InnerOfGeneric.A.Inner<ft<L & Any, L?>>| {
|
||||
@R|java/lang/Override|() public open operator fun iterator(): R|ft<kotlin/collections/MutableIterator<ft<L & Any, L?>>, kotlin/collections/Iterator<ft<L & Any, L?>>?>|
|
||||
public open inner class SubInner<Outer(L) : R|kotlin/Any!|> : R|test/InnerOfGeneric.A.Inner<L!>| {
|
||||
@R|java/lang/Override|() public open operator fun iterator(): R|ft<kotlin/collections/MutableIterator<L!>, kotlin/collections/Iterator<L!>?>|
|
||||
|
||||
public test/InnerOfGeneric.B<L>.constructor(): R|test/InnerOfGeneric.B.SubInner<L>|
|
||||
|
||||
}
|
||||
}
|
||||
public open inner class S<E : R|kotlin/Any!|> : R|kotlin/Any| {
|
||||
public open operator fun iterator(): R|ft<kotlin/collections/MutableIterator<ft<E & Any, E?>>, kotlin/collections/Iterator<ft<E & Any, E?>>?>|
|
||||
public open operator fun iterator(): R|ft<kotlin/collections/MutableIterator<E!>, kotlin/collections/Iterator<E!>?>|
|
||||
|
||||
public test/InnerOfGeneric.constructor<E : R|kotlin/Any!|>(): R|test/InnerOfGeneric.S<E>|
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ public final class MethodReferencesOuterClassTP<P : R|kotlin/Any!|> : R|kotlin/A
|
||||
public constructor<P : R|kotlin/Any!|>(): R|test/MethodReferencesOuterClassTP<P>|
|
||||
|
||||
public final inner class Inner<Outer(P) : R|kotlin/Any!|> : R|kotlin/Any| {
|
||||
public final fun <Q : R|ft<P & Any, P?>|> f(): R|kotlin/Unit|
|
||||
public final fun <Q : R|P!|> f(): R|kotlin/Unit|
|
||||
|
||||
public test/MethodReferencesOuterClassTP<P>.constructor(): R|test/MethodReferencesOuterClassTP.Inner<P>|
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
public final class MethodWithTypePP : R|kotlin/Any| {
|
||||
public final fun <P : R|kotlin/Any!|, Q : R|ft<P & Any, P?>|> f(): R|kotlin/Unit|
|
||||
public final fun <P : R|kotlin/Any!|, Q : R|P!|> f(): R|kotlin/Unit|
|
||||
|
||||
public constructor(): R|test/MethodWithTypePP|
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
public open class MethodWithTypePRefClassP<P : R|kotlin/Any!|> : R|kotlin/Any| {
|
||||
public final fun <Q : R|ft<P & Any, P?>|> f(): R|kotlin/Unit|
|
||||
public final fun <Q : R|P!|> f(): R|kotlin/Unit|
|
||||
|
||||
public constructor<P : R|kotlin/Any!|>(): R|test/MethodWithTypePRefClassP<P>|
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
public final class MethosWithPRefTP : R|kotlin/Any| {
|
||||
public final fun <P : R|kotlin/Any!|> f(p: R|ft<P & Any, P?>|): R|kotlin/Unit|
|
||||
public final fun <P : R|kotlin/Any!|> f(p: R|P!|): R|kotlin/Unit|
|
||||
|
||||
public constructor(): R|test/MethosWithPRefTP|
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user