KT-61890 [AA] Add test for ContextCollector at loop variable position
This turns out to be important for conflict resolution in postfix completion in K2 IDE (see `KotlinDeclarationNameValidator`)
This commit is contained in:
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
fun usage(list: List<Int>) {
|
||||
for (<expr>loopVar</expr> in list) {}
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
element: loopVar
|
||||
implicit receivers:
|
||||
scopes:
|
||||
LocalScope, index = 0
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
LocalScope, index = 1
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 1
|
||||
val `<iterator>`: kotlin.collections.Iterator<kotlin.Int>
|
||||
constructors: 0
|
||||
|
||||
LocalScope, index = 2
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
LocalScope, index = 3
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 1
|
||||
list: kotlin.collections.List<kotlin.Int>
|
||||
constructors: 0
|
||||
|
||||
ExplicitSimpleImportingScope, index = 4
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
PackageMemberScope, index = 5
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 1
|
||||
fun usage(list: kotlin.collections.List<kotlin.Int>)
|
||||
constructors: 0
|
||||
|
||||
DefaultSimpleImportingScope, index = 6
|
||||
|
||||
DefaultSimpleImportingScope, index = 7
|
||||
|
||||
ExplicitStarImportingScope, index = 8
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
DefaultSimpleImportingScope, index = 9
|
||||
|
||||
DefaultStarImportingScope, index = 10
|
||||
Vendored
+152
@@ -0,0 +1,152 @@
|
||||
element: loopVar
|
||||
implicit receivers:
|
||||
scopes:
|
||||
LocalScope, index = 0
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
LocalScope, index = 1
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 1
|
||||
KtLocalVariableSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: null
|
||||
contextReceivers: []
|
||||
isExtension: false
|
||||
isVal: true
|
||||
name: <iterator>
|
||||
origin: SOURCE
|
||||
receiverParameter: null
|
||||
returnType: KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: [
|
||||
KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Int
|
||||
]
|
||||
type: kotlin/collections/Iterator<kotlin/Int>
|
||||
symbolKind: LOCAL
|
||||
typeParameters: []
|
||||
constructors: 0
|
||||
|
||||
LocalScope, index = 2
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
LocalScope, index = 3
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 1
|
||||
KtValueParameterSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: null
|
||||
contextReceivers: []
|
||||
generatedPrimaryConstructorProperty: null
|
||||
hasDefaultValue: false
|
||||
isCrossinline: false
|
||||
isExtension: false
|
||||
isImplicitLambdaParameter: false
|
||||
isNoinline: false
|
||||
isVararg: false
|
||||
name: list
|
||||
origin: SOURCE
|
||||
receiverParameter: null
|
||||
returnType: KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: [
|
||||
KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Int
|
||||
]
|
||||
type: kotlin/collections/List<kotlin/Int>
|
||||
symbolKind: LOCAL
|
||||
typeParameters: []
|
||||
constructors: 0
|
||||
|
||||
ExplicitSimpleImportingScope, index = 4
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
PackageMemberScope, index = 5
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 1
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: test/usage
|
||||
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: usage
|
||||
origin: SOURCE
|
||||
receiverParameter: null
|
||||
returnType: KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Unit
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
valueParameters: [
|
||||
KtValueParameterSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: null
|
||||
contextReceivers: []
|
||||
generatedPrimaryConstructorProperty: null
|
||||
hasDefaultValue: false
|
||||
isCrossinline: false
|
||||
isExtension: false
|
||||
isImplicitLambdaParameter: false
|
||||
isNoinline: false
|
||||
isVararg: false
|
||||
name: list
|
||||
origin: SOURCE
|
||||
receiverParameter: null
|
||||
returnType: KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: [
|
||||
KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Int
|
||||
]
|
||||
type: kotlin/collections/List<kotlin/Int>
|
||||
symbolKind: LOCAL
|
||||
typeParameters: []
|
||||
]
|
||||
visibility: Public
|
||||
constructors: 0
|
||||
|
||||
DefaultSimpleImportingScope, index = 6
|
||||
|
||||
DefaultSimpleImportingScope, index = 7
|
||||
|
||||
ExplicitStarImportingScope, index = 8
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
DefaultSimpleImportingScope, index = 9
|
||||
|
||||
DefaultStarImportingScope, index = 10
|
||||
Reference in New Issue
Block a user