KT-61568 [FIR][AA] Do not add redundant file scopes in AllCandidatesResolver
`firResolveSession.getTowerContextProvider` should already contain all the relevant scopes, including default and importing scopes for the file Because of this, import and default scopes had presence over the more local scopes, and the resolve was performed incorrecty - top level candidates were given higher priority ^KT-61568 Fixed ^KTIJ-26824 Fixed
This commit is contained in:
committed by
Space Team
parent
826297979d
commit
21dffe4639
+11
@@ -0,0 +1,11 @@
|
||||
package test
|
||||
|
||||
class A {
|
||||
fun foo() {}
|
||||
|
||||
fun usage() {
|
||||
<expr>foo()</expr>
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
KtApplicableCallCandidateInfo:
|
||||
candidate = KtSimpleFunctionCall:
|
||||
isImplicitInvoke = false
|
||||
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
|
||||
dispatchReceiver = KtImplicitReceiverValue:
|
||||
symbol = KtNamedClassOrObjectSymbol:
|
||||
annotationsList: []
|
||||
classIdIfNonLocal: test/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
|
||||
type = test.A
|
||||
extensionReceiver = null
|
||||
signature = KtFunctionLikeSignature:
|
||||
receiverType = null
|
||||
returnType = kotlin.Unit
|
||||
symbol = test/A.foo(<dispatch receiver>: test.A): kotlin.Unit
|
||||
valueParameters = []
|
||||
callableIdIfNonLocal = test/A.foo
|
||||
typeArgumentsMapping = {}
|
||||
argumentMapping = {}
|
||||
isInBestCandidates = true
|
||||
|
||||
KtApplicableCallCandidateInfo:
|
||||
candidate = KtSimpleFunctionCall:
|
||||
isImplicitInvoke = false
|
||||
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
|
||||
dispatchReceiver = null
|
||||
extensionReceiver = null
|
||||
signature = KtFunctionLikeSignature:
|
||||
receiverType = null
|
||||
returnType = kotlin.Unit
|
||||
symbol = test/foo(): kotlin.Unit
|
||||
valueParameters = []
|
||||
callableIdIfNonLocal = test/foo
|
||||
typeArgumentsMapping = {}
|
||||
argumentMapping = {}
|
||||
isInBestCandidates = false
|
||||
Reference in New Issue
Block a user