Fix origin calculation in CliFe10AnalysisFacade

After this commit, all tests in
Fe10IdeNormalAnalysisSourceModuleFileScopeTestGenerated pass
This commit is contained in:
Mikhail Glukhikh
2022-05-20 18:04:35 +02:00
committed by Space
parent b710b26bf5
commit 133f874351
20 changed files with 24 additions and 266 deletions
@@ -64,7 +64,7 @@ class CliFe10AnalysisFacade(project: Project) : Fe10AnalysisFacade {
} }
override fun getOrigin(file: VirtualFile): KtSymbolOrigin { override fun getOrigin(file: VirtualFile): KtSymbolOrigin {
return KtSymbolOrigin.LIBRARY return KtSymbolOrigin.SOURCE
} }
} }
@@ -1,80 +0,0 @@
KtSuccessCallInfo:
call = KtCompoundArrayAccessCall:
compoundAccess = CompoundAssign:
kind = PLUS_ASSIGN
operand = 1
operationPartiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = KtExplicitReceiverValue:
expression = m["a"]
isSafeNavigation = false
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
returnType = kotlin.Int
symbol = kotlin/Int.plus(<dispatch receiver>: kotlin.Int, other: kotlin.Int): kotlin.Int
valueParameters = [
KtVariableLikeSignature:
name = other
receiverType = null
returnType = kotlin.Int
symbol = other: kotlin.Int
]
getPartiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
returnType = kotlin.Int
symbol = /MyMap.get(<dispatch receiver>: MyMap<K1, V1>, k: K1): V1
valueParameters = [
KtVariableLikeSignature:
name = k
receiverType = null
returnType = kotlin.String
symbol = k: K1
]
indexArguments = [
"a"
]
setPartiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = KtImplicitReceiverValue:
symbol = KtNamedClassOrObjectSymbol:
annotationsList: []
classIdIfNonLocal: Foo
classKind: INTERFACE
companionObject: null
isData: false
isExternal: false
isFun: false
isInline: false
isInner: false
modality: ABSTRACT
name: Foo
origin: LIBRARY
superTypes: [
kotlin/Any
]
symbolKind: TOP_LEVEL
typeParameters: []
visibility: Public
extensionReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
signature = KtFunctionLikeSignature:
receiverType = MyMap<kotlin.String, kotlin.Int>
returnType = kotlin.Unit
symbol = /Foo.set(<extension receiver>: MyMap<K2, V2>, <dispatch receiver>: Foo, k: K2, v: V2): kotlin.Unit
valueParameters = [
KtVariableLikeSignature:
name = k
receiverType = null
returnType = kotlin.String
symbol = k: K2,
KtVariableLikeSignature:
name = v
receiverType = null
returnType = kotlin.Int
symbol = v: V2
]
@@ -1,74 +0,0 @@
KtSuccessCallInfo:
call = KtCompoundArrayAccessCall:
compoundAccess = IncOrDecOperation:
kind = INC
precedence = POSTFIX
operationPartiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = KtExplicitReceiverValue:
expression = m["a"]
isSafeNavigation = false
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
returnType = kotlin.Int
symbol = kotlin/Int.inc(<dispatch receiver>: kotlin.Int): kotlin.Int
valueParameters = []
getPartiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
returnType = kotlin.Int
symbol = /MyMap.get(<dispatch receiver>: MyMap<K1, V1>, k: K1): V1
valueParameters = [
KtVariableLikeSignature:
name = k
receiverType = null
returnType = kotlin.String
symbol = k: K1
]
indexArguments = [
"a"
]
setPartiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = KtImplicitReceiverValue:
symbol = KtNamedClassOrObjectSymbol:
annotationsList: []
classIdIfNonLocal: Foo
classKind: INTERFACE
companionObject: null
isData: false
isExternal: false
isFun: false
isInline: false
isInner: false
modality: ABSTRACT
name: Foo
origin: LIBRARY
superTypes: [
kotlin/Any
]
symbolKind: TOP_LEVEL
typeParameters: []
visibility: Public
extensionReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
signature = KtFunctionLikeSignature:
receiverType = MyMap<kotlin.String, kotlin.Int>
returnType = kotlin.Unit
symbol = /Foo.set(<extension receiver>: MyMap<K2, V2>, <dispatch receiver>: Foo, k: K2, v: V2): kotlin.Unit
valueParameters = [
KtVariableLikeSignature:
name = k
receiverType = null
returnType = kotlin.String
symbol = k: K2,
KtVariableLikeSignature:
name = v
receiverType = null
returnType = kotlin.Int
symbol = v: V2
]
@@ -1,74 +0,0 @@
KtSuccessCallInfo:
call = KtCompoundArrayAccessCall:
compoundAccess = IncOrDecOperation:
kind = INC
precedence = PREFIX
operationPartiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = KtExplicitReceiverValue:
expression = m["a"]
isSafeNavigation = false
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
returnType = kotlin.Int
symbol = kotlin/Int.inc(<dispatch receiver>: kotlin.Int): kotlin.Int
valueParameters = []
getPartiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
returnType = kotlin.Int
symbol = /MyMap.get(<dispatch receiver>: MyMap<K1, V1>, k: K1): V1
valueParameters = [
KtVariableLikeSignature:
name = k
receiverType = null
returnType = kotlin.String
symbol = k: K1
]
indexArguments = [
"a"
]
setPartiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = KtImplicitReceiverValue:
symbol = KtNamedClassOrObjectSymbol:
annotationsList: []
classIdIfNonLocal: Foo
classKind: INTERFACE
companionObject: null
isData: false
isExternal: false
isFun: false
isInline: false
isInner: false
modality: ABSTRACT
name: Foo
origin: LIBRARY
superTypes: [
kotlin/Any
]
symbolKind: TOP_LEVEL
typeParameters: []
visibility: Public
extensionReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
signature = KtFunctionLikeSignature:
receiverType = MyMap<kotlin.String, kotlin.Int>
returnType = kotlin.Unit
symbol = /Foo.set(<extension receiver>: MyMap<K2, V2>, <dispatch receiver>: Foo, k: K2, v: V2): kotlin.Unit
valueParameters = [
KtVariableLikeSignature:
name = k
receiverType = null
returnType = kotlin.String
symbol = k: K2,
KtVariableLikeSignature:
name = v
receiverType = null
returnType = kotlin.Int
symbol = v: V2
]
@@ -1,7 +1,7 @@
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/Base.noGeneric callableIdIfNonLocal: test/Base.noGeneric
name: noGeneric name: noGeneric
origin: LIBRARY origin: SOURCE
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/ClassWithGenericBase.withOuterGeneric callableIdIfNonLocal: test/ClassWithGenericBase.withOuterGeneric
@@ -11,7 +11,7 @@ KtFunctionSymbol:
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/Base.withOwnGeneric callableIdIfNonLocal: test/Base.withOwnGeneric
name: withOwnGeneric name: withOwnGeneric
origin: LIBRARY origin: SOURCE
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/ClassWithGenericBase.withOuterAndOwnGeneric callableIdIfNonLocal: test/ClassWithGenericBase.withOuterAndOwnGeneric
@@ -1,7 +1,7 @@
KtKotlinPropertySymbol: KtKotlinPropertySymbol:
callableIdIfNonLocal: test/Base.noGeneric callableIdIfNonLocal: test/Base.noGeneric
name: noGeneric name: noGeneric
origin: LIBRARY origin: SOURCE
KtKotlinPropertySymbol: KtKotlinPropertySymbol:
callableIdIfNonLocal: test/ClassWithGenericBase.withOuterGeneric callableIdIfNonLocal: test/ClassWithGenericBase.withOuterGeneric
@@ -11,7 +11,7 @@ KtKotlinPropertySymbol:
KtKotlinPropertySymbol: KtKotlinPropertySymbol:
callableIdIfNonLocal: test/Base.withOwnGeneric callableIdIfNonLocal: test/Base.withOwnGeneric
name: withOwnGeneric name: withOwnGeneric
origin: LIBRARY origin: SOURCE
KtKotlinPropertySymbol: KtKotlinPropertySymbol:
callableIdIfNonLocal: test/ClassWithGenericBase.withOuterAndOwnGeneric callableIdIfNonLocal: test/ClassWithGenericBase.withOuterAndOwnGeneric
@@ -1,7 +1,7 @@
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/InterfaceWithFun.noGenerics_InterfaceWithFun callableIdIfNonLocal: test/InterfaceWithFun.noGenerics_InterfaceWithFun
name: noGenerics_InterfaceWithFun name: noGenerics_InterfaceWithFun
origin: LIBRARY origin: SOURCE
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/ClassWithInterfaceWithFun.withOuterGeneric_InterfaceWithFun callableIdIfNonLocal: test/ClassWithInterfaceWithFun.withOuterGeneric_InterfaceWithFun
@@ -11,7 +11,7 @@ KtFunctionSymbol:
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/InterfaceWithFunBase.noGenerics_InterfaceWithFunBase callableIdIfNonLocal: test/InterfaceWithFunBase.noGenerics_InterfaceWithFunBase
name: noGenerics_InterfaceWithFunBase name: noGenerics_InterfaceWithFunBase
origin: LIBRARY origin: SOURCE
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/InterfaceWithFun.withOuterGenericT1_InterfaceWithFunBase callableIdIfNonLocal: test/InterfaceWithFun.withOuterGenericT1_InterfaceWithFunBase
@@ -1,7 +1,7 @@
KtKotlinPropertySymbol: KtKotlinPropertySymbol:
callableIdIfNonLocal: test/InterfaceWithVal.noGenerics_InterfaceWithVal callableIdIfNonLocal: test/InterfaceWithVal.noGenerics_InterfaceWithVal
name: noGenerics_InterfaceWithVal name: noGenerics_InterfaceWithVal
origin: LIBRARY origin: SOURCE
KtKotlinPropertySymbol: KtKotlinPropertySymbol:
callableIdIfNonLocal: test/ClassWithInterfaceWithVal.withOuterGeneric_InterfaceWithVal callableIdIfNonLocal: test/ClassWithInterfaceWithVal.withOuterGeneric_InterfaceWithVal
@@ -11,7 +11,7 @@ KtKotlinPropertySymbol:
KtKotlinPropertySymbol: KtKotlinPropertySymbol:
callableIdIfNonLocal: test/InterfaceWithVal.withOwnGeneric_InterfaceWithVal callableIdIfNonLocal: test/InterfaceWithVal.withOwnGeneric_InterfaceWithVal
name: withOwnGeneric_InterfaceWithVal name: withOwnGeneric_InterfaceWithVal
origin: LIBRARY origin: SOURCE
KtKotlinPropertySymbol: KtKotlinPropertySymbol:
callableIdIfNonLocal: test/ClassWithInterfaceWithVal.withOwnAndOuterGeneric_InterfaceWithVal callableIdIfNonLocal: test/ClassWithInterfaceWithVal.withOwnAndOuterGeneric_InterfaceWithVal
@@ -21,7 +21,7 @@ KtKotlinPropertySymbol:
KtKotlinPropertySymbol: KtKotlinPropertySymbol:
callableIdIfNonLocal: test/InterfaceWithValBase.noGenerics_InterfaceWithValBase callableIdIfNonLocal: test/InterfaceWithValBase.noGenerics_InterfaceWithValBase
name: noGenerics_InterfaceWithValBase name: noGenerics_InterfaceWithValBase
origin: LIBRARY origin: SOURCE
KtKotlinPropertySymbol: KtKotlinPropertySymbol:
callableIdIfNonLocal: test/InterfaceWithVal.withOuterGenericT1_InterfaceWithValBase callableIdIfNonLocal: test/InterfaceWithVal.withOuterGenericT1_InterfaceWithValBase
@@ -36,7 +36,7 @@ KtKotlinPropertySymbol:
KtKotlinPropertySymbol: KtKotlinPropertySymbol:
callableIdIfNonLocal: test/InterfaceWithValBase.withOwnGeneric_InterfaceWithValBase callableIdIfNonLocal: test/InterfaceWithValBase.withOwnGeneric_InterfaceWithValBase
name: withOwnGeneric_InterfaceWithValBase name: withOwnGeneric_InterfaceWithValBase
origin: LIBRARY origin: SOURCE
KtKotlinPropertySymbol: KtKotlinPropertySymbol:
callableIdIfNonLocal: test/InterfaceWithVal.withOwnAndOuterGenericT1_InterfaceWithValBase callableIdIfNonLocal: test/InterfaceWithVal.withOwnAndOuterGenericT1_InterfaceWithValBase
@@ -1,7 +1,7 @@
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: null callableIdIfNonLocal: null
name: noGenerics name: noGenerics
origin: LIBRARY origin: SOURCE
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: null callableIdIfNonLocal: null
@@ -1,7 +1,7 @@
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: null callableIdIfNonLocal: null
name: noGenerics name: noGenerics
origin: LIBRARY origin: SOURCE
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: null callableIdIfNonLocal: null
@@ -1,12 +1,12 @@
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/TopLevel.Base.noGeneric callableIdIfNonLocal: test/TopLevel.Base.noGeneric
name: noGeneric name: noGeneric
origin: LIBRARY origin: SOURCE
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/TopLevel.Base.withOuter callableIdIfNonLocal: test/TopLevel.Base.withOuter
name: withOuter name: withOuter
origin: LIBRARY origin: SOURCE
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: kotlin/Any.equals callableIdIfNonLocal: kotlin/Any.equals
@@ -1,12 +1,12 @@
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/TopLevel.Base.noGeneric callableIdIfNonLocal: test/TopLevel.Base.noGeneric
name: noGeneric name: noGeneric
origin: LIBRARY origin: SOURCE
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/TopLevel.Base.withOuter callableIdIfNonLocal: test/TopLevel.Base.withOuter
name: withOuter name: withOuter
origin: LIBRARY origin: SOURCE
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/TopLevel.Child.withOwnAndOuter callableIdIfNonLocal: test/TopLevel.Child.withOwnAndOuter
@@ -1,7 +1,7 @@
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/TopLevel.Base.noGeneric callableIdIfNonLocal: test/TopLevel.Base.noGeneric
name: noGeneric name: noGeneric
origin: LIBRARY origin: SOURCE
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/OtherTopLevel.Child.withOuter callableIdIfNonLocal: test/OtherTopLevel.Child.withOuter
@@ -1,7 +1,7 @@
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/TopLevel.Base.noGeneric callableIdIfNonLocal: test/TopLevel.Base.noGeneric
name: noGeneric name: noGeneric
origin: LIBRARY origin: SOURCE
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/OtherTopLevel.Child.withOuter callableIdIfNonLocal: test/OtherTopLevel.Child.withOuter
@@ -1,7 +1,7 @@
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/TopLevel.Base.noGeneric callableIdIfNonLocal: test/TopLevel.Base.noGeneric
name: noGeneric name: noGeneric
origin: LIBRARY origin: SOURCE
KtFunctionSymbol: KtFunctionSymbol:
callableIdIfNonLocal: test/OtherTopLevel.Child.withOuter callableIdIfNonLocal: test/OtherTopLevel.Child.withOuter
@@ -1,7 +1,7 @@
KtKotlinPropertySymbol: KtKotlinPropertySymbol:
callableIdIfNonLocal: test/MyInterface.withOwnGeneric_InterfaceWithValBase callableIdIfNonLocal: test/MyInterface.withOwnGeneric_InterfaceWithValBase
name: withOwnGeneric_InterfaceWithValBase name: withOwnGeneric_InterfaceWithValBase
origin: LIBRARY origin: SOURCE
KtKotlinPropertySymbol: KtKotlinPropertySymbol:
callableIdIfNonLocal: test/Inheritor.withOwnAndOuterGenericAsTypeBound_InterfaceWithValBase callableIdIfNonLocal: test/Inheritor.withOwnAndOuterGenericAsTypeBound_InterfaceWithValBase
@@ -13,7 +13,7 @@ KtNamedClassOrObjectSymbol:
isInner: false isInner: false
modality: FINAL modality: FINAL
name: MyClass name: MyClass
origin: LIBRARY origin: SOURCE
superTypes: [ superTypes: [
kotlin/Any kotlin/Any
] ]
@@ -1,14 +0,0 @@
KtValueParameterSymbol:
annotationsList: []
callableIdIfNonLocal: null
hasDefaultValue: false
isExtension: false
isImplicitLambdaParameter: false
isVararg: false
name: it
origin: LIBRARY
receiverType: null
returnType: kotlin/Int
symbolKind: LOCAL
getContainingModule: KtSourceModule "Sources of main"
deprecationStatus: null
@@ -13,7 +13,7 @@ KtFunctionSymbol:
isSuspend: false isSuspend: false
modality: FINAL modality: FINAL
name: withOuter name: withOuter
origin: LIBRARY origin: SOURCE
receiverType: null receiverType: null
returnType: Outer? returnType: Outer?
symbolKind: CLASS_MEMBER symbolKind: CLASS_MEMBER
@@ -13,7 +13,7 @@ KtNamedClassOrObjectSymbol:
isInner: false isInner: false
modality: FINAL modality: FINAL
name: WithGeneratedCompanion name: WithGeneratedCompanion
origin: LIBRARY origin: SOURCE
superTypes: [ superTypes: [
kotlin/Any kotlin/Any
] ]