[AA] Add tests for scope context for position
KTIJ-27007
This commit is contained in:
committed by
Space Team
parent
6d00dcf972
commit
752ea6fd98
+11
@@ -0,0 +1,11 @@
|
||||
// FILE: main.kt
|
||||
import pkg.A
|
||||
|
||||
class B
|
||||
|
||||
@<expr>e</expr>
|
||||
|
||||
// FILE: dependency.kt
|
||||
package pkg
|
||||
|
||||
annotation class A
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
element: e
|
||||
implicit receivers:
|
||||
scopes:
|
||||
ExplicitSimpleImportingScope, index = 0
|
||||
packages: 0
|
||||
classifiers: 1
|
||||
annotation class A
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
PackageMemberScope, index = 1
|
||||
packages: 7
|
||||
META-INF
|
||||
java
|
||||
javax
|
||||
kotlin
|
||||
org
|
||||
pkg
|
||||
sun
|
||||
classifiers: 1
|
||||
class B
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
DefaultSimpleImportingScope, index = 2
|
||||
|
||||
DefaultSimpleImportingScope, index = 3
|
||||
|
||||
ExplicitStarImportingScope, index = 4
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
DefaultSimpleImportingScope, index = 5
|
||||
|
||||
DefaultStarImportingScope, index = 6
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
element: e
|
||||
implicit receivers:
|
||||
scopes:
|
||||
ExplicitSimpleImportingScope, index = 0
|
||||
packages: 0
|
||||
classifiers: 1
|
||||
KtNamedClassOrObjectSymbol:
|
||||
annotationsList: []
|
||||
classIdIfNonLocal: pkg/A
|
||||
classKind: ANNOTATION_CLASS
|
||||
companionObject: null
|
||||
contextReceivers: []
|
||||
isActual: false
|
||||
isData: false
|
||||
isExpect: false
|
||||
isExternal: false
|
||||
isFun: false
|
||||
isInline: false
|
||||
isInner: false
|
||||
modality: FINAL
|
||||
name: A
|
||||
origin: SOURCE
|
||||
superTypes: [
|
||||
KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Annotation
|
||||
]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
PackageMemberScope, index = 1
|
||||
packages: 7
|
||||
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: pkg
|
||||
origin: SOURCE
|
||||
KtPackageSymbol:
|
||||
fqName: sun
|
||||
origin: SOURCE
|
||||
classifiers: 1
|
||||
KtNamedClassOrObjectSymbol:
|
||||
annotationsList: []
|
||||
classIdIfNonLocal: B
|
||||
classKind: CLASS
|
||||
companionObject: null
|
||||
contextReceivers: []
|
||||
isActual: false
|
||||
isData: false
|
||||
isExpect: false
|
||||
isExternal: false
|
||||
isFun: false
|
||||
isInline: false
|
||||
isInner: false
|
||||
modality: FINAL
|
||||
name: B
|
||||
origin: SOURCE
|
||||
superTypes: [
|
||||
KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Any
|
||||
]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
DefaultSimpleImportingScope, index = 2
|
||||
|
||||
DefaultSimpleImportingScope, index = 3
|
||||
|
||||
ExplicitStarImportingScope, index = 4
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
DefaultSimpleImportingScope, index = 5
|
||||
|
||||
DefaultStarImportingScope, index = 6
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// IGNORE_FIR
|
||||
// FILE: main.kt
|
||||
import pkg.A
|
||||
|
||||
class B
|
||||
|
||||
context(<expr>e</expr>)
|
||||
|
||||
// FILE: dependency.kt
|
||||
package pkg
|
||||
|
||||
class A
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
element: e
|
||||
implicit receivers:
|
||||
scopes:
|
||||
ExplicitSimpleImportingScope, index = 0
|
||||
packages: 0
|
||||
classifiers: 1
|
||||
class A
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
PackageMemberScope, index = 1
|
||||
packages: 7
|
||||
META-INF
|
||||
java
|
||||
javax
|
||||
kotlin
|
||||
org
|
||||
pkg
|
||||
sun
|
||||
classifiers: 1
|
||||
class B
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
DefaultSimpleImportingScope, index = 2
|
||||
|
||||
DefaultSimpleImportingScope, index = 3
|
||||
|
||||
ExplicitStarImportingScope, index = 4
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
DefaultSimpleImportingScope, index = 5
|
||||
|
||||
DefaultStarImportingScope, index = 6
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
element: e
|
||||
implicit receivers:
|
||||
scopes:
|
||||
ExplicitSimpleImportingScope, index = 0
|
||||
packages: 0
|
||||
classifiers: 1
|
||||
KtNamedClassOrObjectSymbol:
|
||||
annotationsList: []
|
||||
classIdIfNonLocal: pkg/A
|
||||
classKind: CLASS
|
||||
companionObject: null
|
||||
contextReceivers: []
|
||||
isActual: false
|
||||
isData: false
|
||||
isExpect: false
|
||||
isExternal: false
|
||||
isFun: false
|
||||
isInline: false
|
||||
isInner: false
|
||||
modality: FINAL
|
||||
name: A
|
||||
origin: SOURCE
|
||||
superTypes: [
|
||||
KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Any
|
||||
]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
PackageMemberScope, index = 1
|
||||
packages: 7
|
||||
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: pkg
|
||||
origin: SOURCE
|
||||
KtPackageSymbol:
|
||||
fqName: sun
|
||||
origin: SOURCE
|
||||
classifiers: 1
|
||||
KtNamedClassOrObjectSymbol:
|
||||
annotationsList: []
|
||||
classIdIfNonLocal: B
|
||||
classKind: CLASS
|
||||
companionObject: null
|
||||
contextReceivers: []
|
||||
isActual: false
|
||||
isData: false
|
||||
isExpect: false
|
||||
isExternal: false
|
||||
isFun: false
|
||||
isInline: false
|
||||
isInner: false
|
||||
modality: FINAL
|
||||
name: B
|
||||
origin: SOURCE
|
||||
superTypes: [
|
||||
KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Any
|
||||
]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
DefaultSimpleImportingScope, index = 2
|
||||
|
||||
DefaultSimpleImportingScope, index = 3
|
||||
|
||||
ExplicitStarImportingScope, index = 4
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
DefaultSimpleImportingScope, index = 5
|
||||
|
||||
DefaultStarImportingScope, index = 6
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
// IGNORE_FIR
|
||||
import a.b.c.<expr>e</expr>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
element: e
|
||||
implicit receivers:
|
||||
scopes:
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
element: e
|
||||
implicit receivers:
|
||||
scopes:
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
// IGNORE_FIR
|
||||
package a.b.c.<expr>e</expr>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
element: e
|
||||
implicit receivers:
|
||||
scopes:
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
element: e
|
||||
implicit receivers:
|
||||
scopes:
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// IGNORE_FIR
|
||||
// FILE: main.kt
|
||||
import pkg.A
|
||||
|
||||
class B
|
||||
/**
|
||||
* [<expr>e</expr>]
|
||||
*/
|
||||
|
||||
// FILE: dependency.kt
|
||||
package pkg
|
||||
|
||||
class A
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
element: e
|
||||
implicit receivers:
|
||||
scopes:
|
||||
ExplicitSimpleImportingScope, index = 0
|
||||
packages: 0
|
||||
classifiers: 1
|
||||
class A
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
PackageMemberScope, index = 1
|
||||
packages: 7
|
||||
META-INF
|
||||
java
|
||||
javax
|
||||
kotlin
|
||||
org
|
||||
pkg
|
||||
sun
|
||||
classifiers: 1
|
||||
class B
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
DefaultSimpleImportingScope, index = 2
|
||||
|
||||
DefaultSimpleImportingScope, index = 3
|
||||
|
||||
ExplicitStarImportingScope, index = 4
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
DefaultSimpleImportingScope, index = 5
|
||||
|
||||
DefaultStarImportingScope, index = 6
|
||||
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
element: e
|
||||
implicit receivers:
|
||||
scopes:
|
||||
ExplicitSimpleImportingScope, index = 0
|
||||
packages: 0
|
||||
classifiers: 1
|
||||
KtNamedClassOrObjectSymbol:
|
||||
annotationsList: []
|
||||
classIdIfNonLocal: pkg/A
|
||||
classKind: CLASS
|
||||
companionObject: null
|
||||
contextReceivers: []
|
||||
isActual: false
|
||||
isData: false
|
||||
isExpect: false
|
||||
isExternal: false
|
||||
isFun: false
|
||||
isInline: false
|
||||
isInner: false
|
||||
modality: FINAL
|
||||
name: A
|
||||
origin: SOURCE
|
||||
superTypes: [
|
||||
KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Any
|
||||
]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
PackageMemberScope, index = 1
|
||||
packages: 7
|
||||
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: pkg
|
||||
origin: SOURCE
|
||||
KtPackageSymbol:
|
||||
fqName: sun
|
||||
origin: SOURCE
|
||||
classifiers: 1
|
||||
KtNamedClassOrObjectSymbol:
|
||||
annotationsList: []
|
||||
classIdIfNonLocal: B
|
||||
classKind: CLASS
|
||||
companionObject: null
|
||||
contextReceivers: []
|
||||
isActual: false
|
||||
isData: false
|
||||
isExpect: false
|
||||
isExternal: false
|
||||
isFun: false
|
||||
isInline: false
|
||||
isInner: false
|
||||
modality: FINAL
|
||||
name: B
|
||||
origin: SOURCE
|
||||
superTypes: [
|
||||
KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Any
|
||||
]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
DefaultSimpleImportingScope, index = 2
|
||||
|
||||
DefaultSimpleImportingScope, index = 3
|
||||
|
||||
ExplicitStarImportingScope, index = 4
|
||||
packages: 0
|
||||
classifiers: 0
|
||||
callables: 0
|
||||
constructors: 0
|
||||
|
||||
DefaultSimpleImportingScope, index = 5
|
||||
|
||||
DefaultStarImportingScope, index = 6
|
||||
|
||||
Reference in New Issue
Block a user