Fix rendering of platform type for value parameters
#KT-63979 Fixed
This commit is contained in:
committed by
Space Team
parent
fe1e2b8b34
commit
a3c1f4ea12
+13
-3
@@ -67,11 +67,21 @@ public interface KtFlexibleTypeRenderer {
|
|||||||
lower.nullability == KtTypeNullability.NON_NULLABLE
|
lower.nullability == KtTypeNullability.NON_NULLABLE
|
||||||
&& upper.nullability == KtTypeNullability.NULLABLE
|
&& upper.nullability == KtTypeNullability.NULLABLE
|
||||||
) {
|
) {
|
||||||
if ((lower !is KtNonErrorClassType || lower.ownTypeArguments.isEmpty()) &&
|
if (lower !is KtNonErrorClassType && upper !is KtNonErrorClassType) {
|
||||||
(upper !is KtNonErrorClassType || upper.ownTypeArguments.isEmpty())
|
|
||||||
) {
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
if (lower is KtNonErrorClassType && upper is KtNonErrorClassType) {
|
||||||
|
val lowerOwnTypeArguments = lower.ownTypeArguments
|
||||||
|
val upperOwnTypeArguments = upper.ownTypeArguments
|
||||||
|
if (lowerOwnTypeArguments.size == upperOwnTypeArguments.size) {
|
||||||
|
for ((index, ktTypeProjection) in lowerOwnTypeArguments.withIndex()) {
|
||||||
|
if (upperOwnTypeArguments[index].type != ktTypeProjection.type) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ val name: kotlin.String
|
|||||||
|
|
||||||
val ordinal: kotlin.Int
|
val ordinal: kotlin.Int
|
||||||
|
|
||||||
fun getDeclaringClass(): (java.lang.Class<test.E!>..java.lang.Class<test.E!>?)
|
fun getDeclaringClass(): java.lang.Class<test.E!>!
|
||||||
|
|
||||||
fun finalize()
|
fun finalize()
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ val name: kotlin.String
|
|||||||
|
|
||||||
val ordinal: kotlin.Int
|
val ordinal: kotlin.Int
|
||||||
|
|
||||||
fun getDeclaringClass(): (java.lang.Class<test.E!>..java.lang.Class<test.E!>?)
|
fun getDeclaringClass(): java.lang.Class<test.E!>!
|
||||||
|
|
||||||
fun finalize()
|
fun finalize()
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ val name: kotlin.String
|
|||||||
|
|
||||||
val ordinal: kotlin.Int
|
val ordinal: kotlin.Int
|
||||||
|
|
||||||
fun getDeclaringClass(): (java.lang.Class<test.E!>..java.lang.Class<test.E!>?)
|
fun getDeclaringClass(): java.lang.Class<test.E!>!
|
||||||
|
|
||||||
fun finalize()
|
fun finalize()
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -15,7 +15,7 @@ val name: kotlin.String
|
|||||||
|
|
||||||
val ordinal: kotlin.Int
|
val ordinal: kotlin.Int
|
||||||
|
|
||||||
fun getDeclaringClass(): (java.lang.Class<test.E!>..java.lang.Class<test.E!>?)
|
fun getDeclaringClass(): java.lang.Class<test.E!>!
|
||||||
|
|
||||||
fun finalize()
|
fun finalize()
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ val name: kotlin.String
|
|||||||
|
|
||||||
val ordinal: kotlin.Int
|
val ordinal: kotlin.Int
|
||||||
|
|
||||||
fun getDeclaringClass(): (java.lang.Class<test.E!>..java.lang.Class<test.E!>?)
|
fun getDeclaringClass(): java.lang.Class<test.E!>!
|
||||||
|
|
||||||
fun finalize()
|
fun finalize()
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ val name: kotlin.String
|
|||||||
|
|
||||||
val ordinal: kotlin.Int
|
val ordinal: kotlin.Int
|
||||||
|
|
||||||
fun getDeclaringClass(): (java.lang.Class<test.E!>..java.lang.Class<test.E!>?)
|
fun getDeclaringClass(): java.lang.Class<test.E!>!
|
||||||
|
|
||||||
fun finalize()
|
fun finalize()
|
||||||
|
|
||||||
|
|||||||
Vendored
+2
-2
@@ -96,9 +96,9 @@ open fun replaceFirst(regex: kotlin.String!, replacement: kotlin.String!): kotli
|
|||||||
|
|
||||||
open fun replaceAll(regex: kotlin.String!, replacement: kotlin.String!): kotlin.String!
|
open fun replaceAll(regex: kotlin.String!, replacement: kotlin.String!): kotlin.String!
|
||||||
|
|
||||||
open fun split(regex: kotlin.String!, limit: kotlin.Int): (kotlin.Array<kotlin.String!>..kotlin.Array<out kotlin.String!>?)
|
open fun split(regex: kotlin.String!, limit: kotlin.Int): kotlin.Array<kotlin.String!>!
|
||||||
|
|
||||||
open fun split(regex: kotlin.String!): (kotlin.Array<kotlin.String!>..kotlin.Array<out kotlin.String!>?)
|
open fun split(regex: kotlin.String!): kotlin.Array<kotlin.String!>!
|
||||||
|
|
||||||
open fun toLowerCase(locale: java.util.Locale!): kotlin.String!
|
open fun toLowerCase(locale: java.util.Locale!): kotlin.String!
|
||||||
|
|
||||||
|
|||||||
+4
@@ -43,4 +43,8 @@ public class JavaClass extends SuperClass {
|
|||||||
public void hello() {
|
public void hello() {
|
||||||
System.out.println("hello");
|
System.out.println("hello");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public <T> void method(Class<? extends T> ... classes) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -1,5 +1,7 @@
|
|||||||
open fun hello()
|
open fun hello()
|
||||||
|
|
||||||
|
open fun <T : kotlin.Any!> method(vararg classes: java.lang.Class<out (T & kotlin.Any..T?)>!)
|
||||||
|
|
||||||
@java.lang.Override
|
@java.lang.Override
|
||||||
open fun getActualRandomNumber(): kotlin.Int
|
open fun getActualRandomNumber(): kotlin.Int
|
||||||
|
|
||||||
|
|||||||
+60
@@ -34,6 +34,66 @@ KtFunctionSymbol:
|
|||||||
getContainingModule: KtSourceModule "Sources of main"
|
getContainingModule: KtSourceModule "Sources of main"
|
||||||
deprecationStatus: null
|
deprecationStatus: null
|
||||||
|
|
||||||
|
KtFunctionSymbol:
|
||||||
|
annotationsList: []
|
||||||
|
callableIdIfNonLocal: /JavaClass.method
|
||||||
|
contextReceivers: []
|
||||||
|
contractEffects: []
|
||||||
|
hasStableParameterNames: false
|
||||||
|
isActual: false
|
||||||
|
isBuiltinFunctionInvoke: false
|
||||||
|
isExpect: false
|
||||||
|
isExtension: false
|
||||||
|
isExternal: false
|
||||||
|
isInfix: false
|
||||||
|
isInline: false
|
||||||
|
isOperator: false
|
||||||
|
isOverride: false
|
||||||
|
isStatic: false
|
||||||
|
isSuspend: false
|
||||||
|
modality: OPEN
|
||||||
|
name: method
|
||||||
|
origin: JAVA
|
||||||
|
receiverParameter: null
|
||||||
|
returnType: KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: kotlin/Unit
|
||||||
|
symbolKind: CLASS_MEMBER
|
||||||
|
typeParameters: [
|
||||||
|
KtTypeParameterSymbol(T)
|
||||||
|
]
|
||||||
|
valueParameters: [
|
||||||
|
KtValueParameterSymbol:
|
||||||
|
annotationsList: []
|
||||||
|
callableIdIfNonLocal: null
|
||||||
|
contextReceivers: []
|
||||||
|
generatedPrimaryConstructorProperty: null
|
||||||
|
hasDefaultValue: false
|
||||||
|
isCrossinline: false
|
||||||
|
isExtension: false
|
||||||
|
isImplicitLambdaParameter: false
|
||||||
|
isNoinline: false
|
||||||
|
isVararg: true
|
||||||
|
name: classes
|
||||||
|
origin: JAVA
|
||||||
|
receiverParameter: null
|
||||||
|
returnType: KtFlexibleType:
|
||||||
|
annotationsList: []
|
||||||
|
type: ft<java/lang/Class<out ft<T & Any, T?>>, java/lang/Class<out ft<T & Any, T?>>?>
|
||||||
|
symbolKind: LOCAL
|
||||||
|
typeParameters: []
|
||||||
|
getContainingModule: KtSourceModule "Sources of main"
|
||||||
|
deprecationStatus: null
|
||||||
|
]
|
||||||
|
visibility: Public
|
||||||
|
getDispatchReceiver(): KtUsualClassType:
|
||||||
|
annotationsList: []
|
||||||
|
ownTypeArguments: []
|
||||||
|
type: JavaClass
|
||||||
|
getContainingModule: KtSourceModule "Sources of main"
|
||||||
|
deprecationStatus: null
|
||||||
|
|
||||||
KtFunctionSymbol:
|
KtFunctionSymbol:
|
||||||
annotationsList: [
|
annotationsList: [
|
||||||
java/lang/Override()
|
java/lang/Override()
|
||||||
|
|||||||
+2
-2
@@ -6,9 +6,9 @@ operator fun contains(p0: kotlin.Any!): kotlin.Boolean
|
|||||||
|
|
||||||
abstract operator fun iterator(): kotlin.collections.MutableIterator<test.SomeClass!>
|
abstract operator fun iterator(): kotlin.collections.MutableIterator<test.SomeClass!>
|
||||||
|
|
||||||
fun toArray(): (kotlin.Array<kotlin.Any!>..kotlin.Array<out kotlin.Any!>?)
|
fun toArray(): kotlin.Array<kotlin.Any!>!
|
||||||
|
|
||||||
fun <T : kotlin.Any!> toArray(p0: (kotlin.Array<(T & kotlin.Any..T?)>..kotlin.Array<out (T & kotlin.Any..T?)>?)): (kotlin.Array<(T & kotlin.Any..T?)>..kotlin.Array<out (T & kotlin.Any..T?)>?)
|
fun <T : kotlin.Any!> toArray(p0: kotlin.Array<(T & kotlin.Any..T?)>!): kotlin.Array<(T & kotlin.Any..T?)>!
|
||||||
|
|
||||||
abstract fun add(p0: test.SomeClass!): kotlin.Boolean
|
abstract fun add(p0: test.SomeClass!): kotlin.Boolean
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user