[FIR] Create fake hidden versions of List.getFirst/getLast in JDK < 21
... so that overrides are marked as deprecated regardless of the JDK. #KT-65440 Fixed
This commit is contained in:
committed by
Space Team
parent
c6b2675089
commit
2f49272c42
+4
@@ -45,3 +45,7 @@ open operator fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
open fun hashCode(): kotlin.Int
|
||||
|
||||
open fun toString(): kotlin.String
|
||||
|
||||
fun getFirst(): E
|
||||
|
||||
fun getLast(): E
|
||||
+82
@@ -1546,4 +1546,86 @@ KtFunctionSymbol:
|
||||
getContainingFileSymbol: null
|
||||
getContainingJvmClassName: kotlin.Any
|
||||
getContainingModule: KtBinaryModule "Builtins for JVM (1.8)"
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/collections/MutableList.getFirst
|
||||
contextReceivers: []
|
||||
contractEffects: []
|
||||
hasStableParameterNames: true
|
||||
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: getFirst
|
||||
origin: SUBSTITUTION_OVERRIDE
|
||||
receiverParameter: null
|
||||
returnType: KtTypeParameterType:
|
||||
annotationsList: []
|
||||
type: E
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: [
|
||||
KtTypeParameterType:
|
||||
annotationsList: []
|
||||
type: E
|
||||
]
|
||||
type: kotlin/collections/MutableList<E>
|
||||
getContainingFileSymbol: null
|
||||
getContainingJvmClassName: kotlin.collections.MutableList
|
||||
getContainingModule: KtBinaryModule "Builtins for JVM (1.8)"
|
||||
deprecationStatus: null
|
||||
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/collections/MutableList.getLast
|
||||
contextReceivers: []
|
||||
contractEffects: []
|
||||
hasStableParameterNames: true
|
||||
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: getLast
|
||||
origin: SUBSTITUTION_OVERRIDE
|
||||
receiverParameter: null
|
||||
returnType: KtTypeParameterType:
|
||||
annotationsList: []
|
||||
type: E
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
getDispatchReceiver(): KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: [
|
||||
KtTypeParameterType:
|
||||
annotationsList: []
|
||||
type: E
|
||||
]
|
||||
type: kotlin/collections/MutableList<E>
|
||||
getContainingFileSymbol: null
|
||||
getContainingJvmClassName: kotlin.collections.MutableList
|
||||
getContainingModule: KtBinaryModule "Builtins for JVM (1.8)"
|
||||
deprecationStatus: null
|
||||
+5
@@ -13,6 +13,8 @@ val size: kotlin.Int
|
||||
fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
fun hashCode(): kotlin.Int
|
||||
fun toString(): kotlin.String
|
||||
fun getFirst(): kotlin.Int
|
||||
fun getLast(): kotlin.Int
|
||||
|
||||
|
||||
Declaration Scope:
|
||||
@@ -30,3 +32,6 @@ val size: kotlin.Int
|
||||
fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
fun hashCode(): kotlin.Int
|
||||
fun toString(): kotlin.String
|
||||
fun getFirst(): E
|
||||
fun getLast(): E
|
||||
|
||||
|
||||
+68
@@ -148,6 +148,18 @@ KtFunctionLikeSignature:
|
||||
symbol = kotlin/Any.toString(<dispatch receiver>: kotlin.Any): kotlin.String
|
||||
valueParameters = []
|
||||
callableIdIfNonLocal = kotlin/Any.toString
|
||||
KtFunctionLikeSignature:
|
||||
receiverType = null
|
||||
returnType = kotlin.Int
|
||||
symbol = kotlin/collections/List.getFirst(<dispatch receiver>: kotlin.collections.List<E>): E
|
||||
valueParameters = []
|
||||
callableIdIfNonLocal = kotlin/collections/List.getFirst
|
||||
KtFunctionLikeSignature:
|
||||
receiverType = null
|
||||
returnType = kotlin.Int
|
||||
symbol = kotlin/collections/List.getLast(<dispatch receiver>: kotlin.collections.List<E>): E
|
||||
valueParameters = []
|
||||
callableIdIfNonLocal = kotlin/collections/List.getLast
|
||||
|
||||
|
||||
Declaration Scope:
|
||||
@@ -798,4 +810,60 @@ KtFunctionSymbol:
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/collections/List.getFirst
|
||||
contextReceivers: []
|
||||
contractEffects: []
|
||||
hasStableParameterNames: true
|
||||
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: getFirst
|
||||
origin: LIBRARY
|
||||
receiverParameter: null
|
||||
returnType: KtTypeParameterType:
|
||||
annotationsList: []
|
||||
type: E
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/collections/List.getLast
|
||||
contextReceivers: []
|
||||
contractEffects: []
|
||||
hasStableParameterNames: true
|
||||
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: getLast
|
||||
origin: LIBRARY
|
||||
receiverParameter: null
|
||||
returnType: KtTypeParameterType:
|
||||
annotationsList: []
|
||||
type: E
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
|
||||
|
||||
+5
@@ -13,6 +13,8 @@ val size: kotlin.Int
|
||||
fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
fun hashCode(): kotlin.Int
|
||||
fun toString(): kotlin.String
|
||||
fun getFirst(): AAA
|
||||
fun getLast(): AAA
|
||||
|
||||
|
||||
Declaration Scope:
|
||||
@@ -30,3 +32,6 @@ val size: kotlin.Int
|
||||
fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
fun hashCode(): kotlin.Int
|
||||
fun toString(): kotlin.String
|
||||
fun getFirst(): E
|
||||
fun getLast(): E
|
||||
|
||||
|
||||
+68
@@ -148,6 +148,18 @@ KtFunctionLikeSignature:
|
||||
symbol = kotlin/Any.toString(<dispatch receiver>: kotlin.Any): kotlin.String
|
||||
valueParameters = []
|
||||
callableIdIfNonLocal = kotlin/Any.toString
|
||||
KtFunctionLikeSignature:
|
||||
receiverType = null
|
||||
returnType = AAA
|
||||
symbol = kotlin/collections/List.getFirst(<dispatch receiver>: kotlin.collections.List<E>): E
|
||||
valueParameters = []
|
||||
callableIdIfNonLocal = kotlin/collections/List.getFirst
|
||||
KtFunctionLikeSignature:
|
||||
receiverType = null
|
||||
returnType = AAA
|
||||
symbol = kotlin/collections/List.getLast(<dispatch receiver>: kotlin.collections.List<E>): E
|
||||
valueParameters = []
|
||||
callableIdIfNonLocal = kotlin/collections/List.getLast
|
||||
|
||||
|
||||
Declaration Scope:
|
||||
@@ -798,4 +810,60 @@ KtFunctionSymbol:
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/collections/List.getFirst
|
||||
contextReceivers: []
|
||||
contractEffects: []
|
||||
hasStableParameterNames: true
|
||||
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: getFirst
|
||||
origin: LIBRARY
|
||||
receiverParameter: null
|
||||
returnType: KtTypeParameterType:
|
||||
annotationsList: []
|
||||
type: E
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: kotlin/collections/List.getLast
|
||||
contextReceivers: []
|
||||
contractEffects: []
|
||||
hasStableParameterNames: true
|
||||
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: getLast
|
||||
origin: LIBRARY
|
||||
receiverParameter: null
|
||||
returnType: KtTypeParameterType:
|
||||
annotationsList: []
|
||||
type: E
|
||||
symbolKind: CLASS_MEMBER
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
|
||||
|
||||
Reference in New Issue
Block a user