[Analysis API] add info about context receivers to the Analysis API

This commit is contained in:
Ilya Kirillov
2022-06-30 17:52:10 +02:00
parent 2f822ab4d9
commit 8f89f1b368
40 changed files with 481 additions and 16 deletions
@@ -0,0 +1,4 @@
context(kotlin.Int, s@kotlin.String)
class A {
constructor(int: Int) {}
}
@@ -0,0 +1,3 @@
class A {
constructor(int: kotlin.Int)
}
@@ -0,0 +1,63 @@
KtValueParameterSymbol:
annotationsList: []
callableIdIfNonLocal: null
contextReceivers: []
generatedPrimaryConstructorProperty: null
hasDefaultValue: false
isExtension: false
isImplicitLambdaParameter: false
isVararg: false
name: int
origin: SOURCE
receiverType: null
returnType: kotlin/Int
symbolKind: LOCAL
typeParameters: []
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
KtConstructorSymbol:
annotationsList: []
callableIdIfNonLocal: null
containingClassIdIfNonLocal: A
contextReceivers: []
hasStableParameterNames: true
isExtension: false
isPrimary: false
origin: SOURCE
receiverType: null
returnType: A
symbolKind: CLASS_MEMBER
typeParameters: []
valueParameters: [
KtValueParameterSymbol(int)
]
visibility: Public
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
KtNamedClassOrObjectSymbol:
annotationsList: []
classIdIfNonLocal: A
classKind: CLASS
companionObject: null
contextReceivers: [
ContextReceiver(kotlin/Int)
ContextReceiver(s@kotlin/String)
]
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
@@ -0,0 +1,2 @@
context(Int, s@String)
fun y(){}
@@ -0,0 +1,28 @@
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: /y
contextReceivers: [
ContextReceiver(kotlin/Int)
ContextReceiver(s@kotlin/String)
]
hasStableParameterNames: true
isBuiltinFunctionInvoke: false
isExtension: false
isExternal: false
isInfix: false
isInline: false
isOperator: false
isOverride: false
isStatic: false
isSuspend: false
modality: FINAL
name: y
origin: SOURCE
receiverType: null
returnType: kotlin/Unit
symbolKind: TOP_LEVEL
typeParameters: []
valueParameters: []
visibility: Public
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
@@ -0,0 +1,2 @@
context(Int, s@String)
val y get() = 10
@@ -0,0 +1,56 @@
KtPropertyGetterSymbol:
annotationsList: []
callableIdIfNonLocal: null
contextReceivers: []
hasBody: true
hasStableParameterNames: true
isDefault: false
isExtension: false
isInline: false
isOverride: false
modality: FINAL
origin: SOURCE
receiverType: null
returnType: kotlin/Int
symbolKind: ACCESSOR
typeParameters: []
valueParameters: []
visibility: Public
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
KtKotlinPropertySymbol:
annotationsList: []
callableIdIfNonLocal: /y
contextReceivers: [
ContextReceiver(kotlin/Int)
ContextReceiver(s@kotlin/String)
]
getter: KtPropertyGetterSymbol(<getter>)
hasBackingField: false
hasGetter: true
hasSetter: false
initializer: null
isConst: false
isDelegatedProperty: false
isExtension: false
isFromPrimaryConstructor: false
isLateInit: false
isOverride: false
isStatic: false
isVal: true
modality: FINAL
name: y
origin: SOURCE
receiverType: null
returnType: kotlin/Int
setter: null
symbolKind: TOP_LEVEL
typeParameters: []
visibility: Public
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
getterDeprecationStatus: null
javaGetterName: getY
javaSetterName: null
setterDeprecationStatus: null