Files
kotlin-fork/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.txt
T
Marco Pennekamp 3fa2ca7ddd [AA] Add specific implementation for KtFirEnumEntryInitializerSymbol
- Previously, `KtFirAnonymousObjectSymbol` was a
  `KtEnumEntryInitializerSymbol`, which carried the risk that an
  anonymous object unrelated to enum entries might be used as an enum
  entry initializer. This commit introduces a specific symbol for FIR
  enum entry initializers.
- As a nice side effect, anonymous object symbol creation is simplified
  and `KtFirEnumEntryInitializerSymbolPointer` can restore the symbol
  via `KtFirEnumEntrySymbol.enumEntryInitializer`.

^KT-61425
2023-09-08 11:13:28 +00:00

898 lines
25 KiB
Plaintext
Vendored

element: e
implicit receivers:
type: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: <anonymous>
owner symbol: KtFirEnumEntryInitializerSymbol
type: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/Enum.Companion
owner symbol: KtFirNamedClassOrObjectSymbol
scopes:
LocalScope, index = 0
packages: 0
classifiers: 0
callables: 0
constructors: 0
LocalScope, index = 1
packages: 0
classifiers: 0
callables: 0
constructors: 0
TypeScope, index = 2
packages: 0
classifiers: 1
KtNamedClassOrObjectSymbol:
annotationsList: []
classIdIfNonLocal: kotlin/Enum.Companion
classKind: COMPANION_OBJECT
companionObject: null
contextReceivers: []
isActual: false
isData: false
isExpect: false
isExternal: false
isFun: false
isInline: false
isInner: false
modality: FINAL
name: Companion
origin: LIBRARY
superTypes: [
KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/Any
]
symbolKind: CLASS_MEMBER
typeParameters: []
visibility: Public
callables: 11
KtKotlinPropertySymbol:
annotationsList: []
backingFieldSymbol: KtBackingFieldSymbol:
annotationsList: []
callableIdIfNonLocal: null
contextReceivers: []
isExtension: false
name: field
origin: PROPERTY_BACKING_FIELD
owningProperty: KtKotlinPropertySymbol(<local>/x)
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/String
symbolKind: LOCAL
typeParameters: []
callableIdIfNonLocal: null
contextReceivers: []
getter: KtPropertyGetterSymbol:
annotationsList: []
callableIdIfNonLocal: null
contextReceivers: []
hasBody: false
hasStableParameterNames: true
isDefault: true
isExtension: false
isInline: false
isOverride: false
modality: FINAL
origin: SOURCE
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/String
symbolKind: ACCESSOR
typeParameters: []
valueParameters: []
visibility: Public
hasBackingField: true
hasGetter: true
hasSetter: false
initializer: KtConstantInitializerValue("")
isActual: false
isConst: false
isDelegatedProperty: false
isExpect: false
isExtension: false
isFromPrimaryConstructor: false
isLateInit: false
isOverride: false
isStatic: false
isVal: true
modality: FINAL
name: x
origin: SOURCE
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/String
setter: null
symbolKind: CLASS_MEMBER
typeParameters: []
visibility: Public
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: null
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: FINAL
name: foo
origin: SOURCE
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/Unit
symbolKind: CLASS_MEMBER
typeParameters: []
valueParameters: []
visibility: Public
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: kotlin/Enum.clone
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: FINAL
name: clone
origin: LIBRARY
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/Any
symbolKind: CLASS_MEMBER
typeParameters: []
valueParameters: []
visibility: Protected
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: /E.compareTo
contextReceivers: []
contractEffects: []
hasStableParameterNames: true
isActual: false
isBuiltinFunctionInvoke: false
isExpect: false
isExtension: false
isExternal: false
isInfix: false
isInline: false
isOperator: true
isOverride: false
isStatic: false
isSuspend: false
modality: FINAL
name: compareTo
origin: SUBSTITUTION_OVERRIDE
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/Int
symbolKind: CLASS_MEMBER
typeParameters: []
valueParameters: [
KtValueParameterSymbol:
annotationsList: []
callableIdIfNonLocal: null
contextReceivers: []
generatedPrimaryConstructorProperty: null
hasDefaultValue: false
isCrossinline: false
isExtension: false
isImplicitLambdaParameter: false
isNoinline: false
isVararg: false
name: other
origin: SUBSTITUTION_OVERRIDE
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: E
symbolKind: LOCAL
typeParameters: []
]
visibility: Public
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: kotlin/Enum.equals
contextReceivers: []
contractEffects: []
hasStableParameterNames: true
isActual: false
isBuiltinFunctionInvoke: false
isExpect: false
isExtension: false
isExternal: false
isInfix: false
isInline: false
isOperator: true
isOverride: false
isStatic: false
isSuspend: false
modality: FINAL
name: equals
origin: LIBRARY
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/Boolean
symbolKind: CLASS_MEMBER
typeParameters: []
valueParameters: [
KtValueParameterSymbol:
annotationsList: []
callableIdIfNonLocal: null
contextReceivers: []
generatedPrimaryConstructorProperty: null
hasDefaultValue: false
isCrossinline: false
isExtension: false
isImplicitLambdaParameter: false
isNoinline: false
isVararg: false
name: other
origin: LIBRARY
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/Any?
symbolKind: LOCAL
typeParameters: []
]
visibility: Public
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: kotlin/Enum.hashCode
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: FINAL
name: hashCode
origin: LIBRARY
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/Int
symbolKind: CLASS_MEMBER
typeParameters: []
valueParameters: []
visibility: Public
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: kotlin/Enum.toString
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: toString
origin: LIBRARY
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/String
symbolKind: CLASS_MEMBER
typeParameters: []
valueParameters: []
visibility: Public
KtKotlinPropertySymbol:
annotationsList: [
kotlin/internal/IntrinsicConstEvaluation()
psi: null
]
backingFieldSymbol: KtBackingFieldSymbol:
annotationsList: []
callableIdIfNonLocal: null
contextReceivers: []
isExtension: false
name: field
origin: PROPERTY_BACKING_FIELD
owningProperty: KtKotlinPropertySymbol(kotlin/Enum.name)
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/String
symbolKind: LOCAL
typeParameters: []
callableIdIfNonLocal: kotlin/Enum.name
contextReceivers: []
getter: null
hasBackingField: true
hasGetter: false
hasSetter: false
initializer: null
isActual: false
isConst: false
isDelegatedProperty: false
isExpect: false
isExtension: false
isFromPrimaryConstructor: false
isLateInit: false
isOverride: false
isStatic: false
isVal: true
modality: FINAL
name: name
origin: LIBRARY
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/String
setter: null
symbolKind: CLASS_MEMBER
typeParameters: []
visibility: Public
KtKotlinPropertySymbol:
annotationsList: []
backingFieldSymbol: KtBackingFieldSymbol:
annotationsList: []
callableIdIfNonLocal: null
contextReceivers: []
isExtension: false
name: field
origin: PROPERTY_BACKING_FIELD
owningProperty: KtKotlinPropertySymbol(kotlin/Enum.ordinal)
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/Int
symbolKind: LOCAL
typeParameters: []
callableIdIfNonLocal: kotlin/Enum.ordinal
contextReceivers: []
getter: null
hasBackingField: true
hasGetter: false
hasSetter: false
initializer: null
isActual: false
isConst: false
isDelegatedProperty: false
isExpect: false
isExtension: false
isFromPrimaryConstructor: false
isLateInit: false
isOverride: false
isStatic: false
isVal: true
modality: FINAL
name: ordinal
origin: LIBRARY
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/Int
setter: null
symbolKind: CLASS_MEMBER
typeParameters: []
visibility: Public
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: /E.getDeclaringClass
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: FINAL
name: getDeclaringClass
origin: SUBSTITUTION_OVERRIDE
receiverParameter: null
returnType: KtFlexibleType:
annotationsList: []
type: ft<java/lang/Class<E!>, java/lang/Class<E!>?>
symbolKind: CLASS_MEMBER
typeParameters: []
valueParameters: []
visibility: Public
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: kotlin/Enum.finalize
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: FINAL
name: finalize
origin: JAVA
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/Unit
symbolKind: CLASS_MEMBER
typeParameters: []
valueParameters: []
visibility: ProtectedAndPackage
constructors: 1
KtConstructorSymbol:
annotationsList: []
callableIdIfNonLocal: null
containingClassIdIfNonLocal: null
contextReceivers: []
hasStableParameterNames: true
isActual: false
isExpect: false
isExtension: false
isPrimary: true
origin: SOURCE_MEMBER_GENERATED
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: <anonymous>
symbolKind: CLASS_MEMBER
typeParameters: []
valueParameters: []
visibility: Private
StaticMemberScope, index = 3
packages: 0
classifiers: 0
callables: 4
KtEnumEntrySymbol:
annotationsList: []
callableIdIfNonLocal: /E.A
containingEnumClassIdIfNonLocal: E
contextReceivers: []
enumEntryInitializer: KtAnonymousObjectSymbol(<local>/<no name provided>)
isExtension: false
name: A
origin: SOURCE
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: E
symbolKind: CLASS_MEMBER
typeParameters: []
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: /E.values
contextReceivers: []
contractEffects: []
hasStableParameterNames: true
isActual: false
isBuiltinFunctionInvoke: false
isExpect: false
isExtension: false
isExternal: false
isInfix: false
isInline: false
isOperator: false
isOverride: false
isStatic: true
isSuspend: false
modality: FINAL
name: values
origin: SOURCE_MEMBER_GENERATED
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: [
KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: E
]
type: kotlin/Array<E>
symbolKind: CLASS_MEMBER
typeParameters: []
valueParameters: []
visibility: Public
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: /E.valueOf
contextReceivers: []
contractEffects: []
hasStableParameterNames: true
isActual: false
isBuiltinFunctionInvoke: false
isExpect: false
isExtension: false
isExternal: false
isInfix: false
isInline: false
isOperator: false
isOverride: false
isStatic: true
isSuspend: false
modality: FINAL
name: valueOf
origin: SOURCE_MEMBER_GENERATED
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: E
symbolKind: CLASS_MEMBER
typeParameters: []
valueParameters: [
KtValueParameterSymbol:
annotationsList: []
callableIdIfNonLocal: null
contextReceivers: []
generatedPrimaryConstructorProperty: null
hasDefaultValue: false
isCrossinline: false
isExtension: false
isImplicitLambdaParameter: false
isNoinline: false
isVararg: false
name: value
origin: SOURCE_MEMBER_GENERATED
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/String
symbolKind: LOCAL
typeParameters: []
]
visibility: Public
KtKotlinPropertySymbol:
annotationsList: []
backingFieldSymbol: null
callableIdIfNonLocal: /E.entries
contextReceivers: []
getter: KtPropertyGetterSymbol:
annotationsList: []
callableIdIfNonLocal: null
contextReceivers: []
hasBody: false
hasStableParameterNames: true
isDefault: true
isExtension: false
isInline: false
isOverride: false
modality: FINAL
origin: SOURCE_MEMBER_GENERATED
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: [
KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: E
]
type: kotlin/enums/EnumEntries<E>
symbolKind: ACCESSOR
typeParameters: []
valueParameters: []
visibility: Public
hasBackingField: false
hasGetter: true
hasSetter: false
initializer: null
isActual: false
isConst: false
isDelegatedProperty: false
isExpect: false
isExtension: false
isFromPrimaryConstructor: false
isLateInit: false
isOverride: false
isStatic: true
isVal: true
modality: FINAL
name: entries
origin: SOURCE_MEMBER_GENERATED
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: [
KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: E
]
type: kotlin/enums/EnumEntries<E>
setter: null
symbolKind: CLASS_MEMBER
typeParameters: []
visibility: Public
constructors: 0
StaticMemberScope, index = 4
packages: 0
classifiers: 1
KtNamedClassOrObjectSymbol:
annotationsList: []
classIdIfNonLocal: kotlin/Enum.Companion
classKind: COMPANION_OBJECT
companionObject: null
contextReceivers: []
isActual: false
isData: false
isExpect: false
isExternal: false
isFun: false
isInline: false
isInner: false
modality: FINAL
name: Companion
origin: LIBRARY
superTypes: [
KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/Any
]
symbolKind: CLASS_MEMBER
typeParameters: []
visibility: Public
callables: 0
constructors: 0
TypeScope, index = 5
packages: 0
classifiers: 0
callables: 3
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: kotlin/Any.equals
contextReceivers: []
contractEffects: []
hasStableParameterNames: true
isActual: false
isBuiltinFunctionInvoke: false
isExpect: false
isExtension: false
isExternal: false
isInfix: false
isInline: false
isOperator: true
isOverride: false
isStatic: false
isSuspend: false
modality: OPEN
name: equals
origin: LIBRARY
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/Boolean
symbolKind: CLASS_MEMBER
typeParameters: []
valueParameters: [
KtValueParameterSymbol:
annotationsList: []
callableIdIfNonLocal: null
contextReceivers: []
generatedPrimaryConstructorProperty: null
hasDefaultValue: false
isCrossinline: false
isExtension: false
isImplicitLambdaParameter: false
isNoinline: false
isVararg: false
name: other
origin: LIBRARY
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/Any?
symbolKind: LOCAL
typeParameters: []
]
visibility: Public
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: kotlin/Any.hashCode
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: hashCode
origin: LIBRARY
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/Int
symbolKind: CLASS_MEMBER
typeParameters: []
valueParameters: []
visibility: Public
KtFunctionSymbol:
annotationsList: []
callableIdIfNonLocal: kotlin/Any.toString
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: toString
origin: LIBRARY
receiverParameter: null
returnType: KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/String
symbolKind: CLASS_MEMBER
typeParameters: []
valueParameters: []
visibility: Public
constructors: 0
ExplicitSimpleImportingScope, index = 6
packages: 0
classifiers: 0
callables: 0
constructors: 0
PackageMemberScope, index = 7
packages: 6
KtPackageSymbol:
fqName: META-INF
origin: SOURCE
KtPackageSymbol:
fqName: java
origin: SOURCE
KtPackageSymbol:
fqName: javax
origin: SOURCE
KtPackageSymbol:
fqName: kotlin
origin: SOURCE
KtPackageSymbol:
fqName: org
origin: SOURCE
KtPackageSymbol:
fqName: sun
origin: SOURCE
classifiers: 1
KtNamedClassOrObjectSymbol:
annotationsList: []
classIdIfNonLocal: E
classKind: ENUM_CLASS
companionObject: null
contextReceivers: []
isActual: false
isData: false
isExpect: false
isExternal: false
isFun: false
isInline: false
isInner: false
modality: FINAL
name: E
origin: SOURCE
superTypes: [
KtUsualClassType:
annotationsList: []
ownTypeArguments: [
KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: E
]
type: kotlin/Enum<E>
]
symbolKind: TOP_LEVEL
typeParameters: []
visibility: Public
callables: 0
constructors: 0
DefaultSimpleImportingScope, index = 8
DefaultSimpleImportingScope, index = 9
ExplicitStarImportingScope, index = 10
packages: 0
classifiers: 0
callables: 0
constructors: 0
DefaultSimpleImportingScope, index = 11
DefaultStarImportingScope, index = 12