[AA FIR] implement FirCallableSignature to simplify search by signature

^KT-54826 Fixed
This commit is contained in:
Dmitrii Gridin
2022-11-22 11:14:46 +01:00
committed by Space Team
parent 48e2e5cc87
commit 2155a23e4e
22 changed files with 546 additions and 73 deletions
@@ -1,5 +1,5 @@
// DO_NOT_CHECK_NON_PSI_SYMBOL_RESTORE
// DO_NOT_CHECK_SYMBOL_RESTORE
// DO_NOT_CHECK_SYMBOL_RESTORE_K1
package test
class SomeClass
@@ -1,4 +1,5 @@
// DO_NOT_CHECK_SYMBOL_RESTORE_K2
// KT-55095
package test
@@ -0,0 +1,16 @@
// DO_NOT_CHECK_NON_PSI_SYMBOL_RESTORE_K1
class A
class B
context(A)
fun tooo() = Unit
context(B)
fun tooo() = Unit
context(A, B)
fun tooo() = Unit
context(B, A)
fun tooo() = Unit
@@ -0,0 +1,11 @@
fun tooo()
fun tooo()
fun tooo()
fun tooo()
class A
class B
@@ -0,0 +1,159 @@
KtNamedClassOrObjectSymbol:
annotationsList: []
classIdIfNonLocal: A
classKind: CLASS
companionObject: null
contextReceivers: []
isData: false
isExternal: false
isFun: false
isInline: false
isInner: false
modality: FINAL
name: A
origin: SOURCE
superTypes: [
kotlin/Any
]
symbolKind: TOP_LEVEL
typeParameters: []
visibility: Public
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
KtNamedClassOrObjectSymbol:
annotationsList: []
classIdIfNonLocal: B
classKind: CLASS
companionObject: null
contextReceivers: []
isData: false
isExternal: false
isFun: false
isInline: false
isInner: false
modality: FINAL
name: B
origin: SOURCE
superTypes: [
kotlin/Any
]
symbolKind: TOP_LEVEL
typeParameters: []
visibility: Public
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: /tooo
contextReceivers: [
ContextReceiver(A)
]
hasStableParameterNames: true
isBuiltinFunctionInvoke: false
isExtension: false
isExternal: false
isInfix: false
isInline: false
isOperator: false
isOverride: false
isStatic: false
isSuspend: false
modality: FINAL
name: tooo
origin: SOURCE
receiverParameter: null
returnType: kotlin/Unit
symbolKind: TOP_LEVEL
typeParameters: []
valueParameters: []
visibility: Public
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: /tooo
contextReceivers: [
ContextReceiver(B)
]
hasStableParameterNames: true
isBuiltinFunctionInvoke: false
isExtension: false
isExternal: false
isInfix: false
isInline: false
isOperator: false
isOverride: false
isStatic: false
isSuspend: false
modality: FINAL
name: tooo
origin: SOURCE
receiverParameter: null
returnType: kotlin/Unit
symbolKind: TOP_LEVEL
typeParameters: []
valueParameters: []
visibility: Public
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: /tooo
contextReceivers: [
ContextReceiver(A)
ContextReceiver(B)
]
hasStableParameterNames: true
isBuiltinFunctionInvoke: false
isExtension: false
isExternal: false
isInfix: false
isInline: false
isOperator: false
isOverride: false
isStatic: false
isSuspend: false
modality: FINAL
name: tooo
origin: SOURCE
receiverParameter: null
returnType: kotlin/Unit
symbolKind: TOP_LEVEL
typeParameters: []
valueParameters: []
visibility: Public
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: /tooo
contextReceivers: [
ContextReceiver(B)
ContextReceiver(A)
]
hasStableParameterNames: true
isBuiltinFunctionInvoke: false
isExtension: false
isExternal: false
isInfix: false
isInline: false
isOperator: false
isOverride: false
isStatic: false
isSuspend: false
modality: FINAL
name: tooo
origin: SOURCE
receiverParameter: null
returnType: kotlin/Unit
symbolKind: TOP_LEVEL
typeParameters: []
valueParameters: []
visibility: Public
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
@@ -0,0 +1,6 @@
// DO_NOT_CHECK_NON_PSI_SYMBOL_RESTORE_K1
open class A
fun <J : A> foo(j: J): J = j
fun <T> foo(j: T): T = j
@@ -0,0 +1,5 @@
fun <J : A> foo(j: J): J
fun <T> foo(j: T): T
open class A
@@ -0,0 +1,142 @@
KtNamedClassOrObjectSymbol:
annotationsList: []
classIdIfNonLocal: A
classKind: CLASS
companionObject: null
contextReceivers: []
isData: false
isExternal: false
isFun: false
isInline: false
isInner: false
modality: OPEN
name: A
origin: SOURCE
superTypes: [
kotlin/Any
]
symbolKind: TOP_LEVEL
typeParameters: []
visibility: Public
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
KtTypeParameterSymbol:
annotationsList: []
isReified: false
name: J
origin: SOURCE
typeParameters: []
upperBounds: [
A
]
variance: INVARIANT
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: /foo
contextReceivers: []
hasStableParameterNames: true
isBuiltinFunctionInvoke: false
isExtension: false
isExternal: false
isInfix: false
isInline: false
isOperator: false
isOverride: false
isStatic: false
isSuspend: false
modality: FINAL
name: foo
origin: SOURCE
receiverParameter: null
returnType: J
symbolKind: TOP_LEVEL
typeParameters: [
KtTypeParameterSymbol(J)
]
valueParameters: [
KtValueParameterSymbol:
annotationsList: []
callableIdIfNonLocal: null
contextReceivers: []
generatedPrimaryConstructorProperty: null
hasDefaultValue: false
isCrossinline: false
isExtension: false
isImplicitLambdaParameter: false
isNoinline: false
isVararg: false
name: j
origin: SOURCE
receiverParameter: null
returnType: J
symbolKind: LOCAL
typeParameters: []
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
]
visibility: Public
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
KtTypeParameterSymbol:
annotationsList: []
isReified: false
name: T
origin: SOURCE
typeParameters: []
upperBounds: []
variance: INVARIANT
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: /foo
contextReceivers: []
hasStableParameterNames: true
isBuiltinFunctionInvoke: false
isExtension: false
isExternal: false
isInfix: false
isInline: false
isOperator: false
isOverride: false
isStatic: false
isSuspend: false
modality: FINAL
name: foo
origin: SOURCE
receiverParameter: null
returnType: T
symbolKind: TOP_LEVEL
typeParameters: [
KtTypeParameterSymbol(T)
]
valueParameters: [
KtValueParameterSymbol:
annotationsList: []
callableIdIfNonLocal: null
contextReceivers: []
generatedPrimaryConstructorProperty: null
hasDefaultValue: false
isCrossinline: false
isExtension: false
isImplicitLambdaParameter: false
isNoinline: false
isVararg: false
name: j
origin: SOURCE
receiverParameter: null
returnType: T
symbolKind: LOCAL
typeParameters: []
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
]
visibility: Public
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null