KT-61568 [FIR][AA] Add one more testcase for AllCandidatesResolver

This commit is contained in:
Roman Golyshev
2023-08-31 12:14:56 +02:00
committed by teamcity
parent 9352e40d54
commit f39153b6e6
5 changed files with 86 additions and 0 deletions
@@ -441,6 +441,12 @@ public class Fe10IdeNormalAnalysisSourceModuleResolveCandidatesTestGenerated ext
runTest("analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/memberFunctionVsTopLevel.kt");
}
@Test
@TestMetadata("overloadWithReceiver.kt")
public void testOverloadWithReceiver() throws Exception {
runTest("analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/overloadWithReceiver.kt");
}
@Test
@TestMetadata("privateMember.kt")
public void testPrivateMember() throws Exception {
@@ -441,6 +441,12 @@ public class FirIdeNormalAnalysisSourceModuleResolveCandidatesTestGenerated exte
runTest("analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/memberFunctionVsTopLevel.kt");
}
@Test
@TestMetadata("overloadWithReceiver.kt")
public void testOverloadWithReceiver() throws Exception {
runTest("analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/overloadWithReceiver.kt");
}
@Test
@TestMetadata("privateMember.kt")
public void testPrivateMember() throws Exception {
@@ -441,6 +441,12 @@ public class FirStandaloneNormalAnalysisSourceModuleResolveCandidatesTestGenerat
runTest("analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/memberFunctionVsTopLevel.kt");
}
@Test
@TestMetadata("overloadWithReceiver.kt")
public void testOverloadWithReceiver() throws Exception {
runTest("analysis/analysis-api/testData/components/callResolver/resolveCandidates/singleCandidate/overloadWithReceiver.kt");
}
@Test
@TestMetadata("privateMember.kt")
public void testPrivateMember() throws Exception {
@@ -0,0 +1,11 @@
package foo
class Foo {
fun test() {
<expr>myRun()</expr>
}
}
fun myRun() {}
fun Any.myRun() {}
@@ -0,0 +1,57 @@
KtApplicableCallCandidateInfo:
candidate = KtSimpleFunctionCall:
isImplicitInvoke = false
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = null
extensionReceiver = KtImplicitReceiverValue:
symbol = KtNamedClassOrObjectSymbol:
annotationsList: []
classIdIfNonLocal: foo/Foo
classKind: CLASS
companionObject: null
contextReceivers: []
isActual: false
isData: false
isExpect: false
isExternal: false
isFun: false
isInline: false
isInner: false
modality: FINAL
name: Foo
origin: SOURCE
superTypes: [
KtUsualClassType:
annotationsList: []
ownTypeArguments: []
type: kotlin/Any
]
symbolKind: TOP_LEVEL
typeParameters: []
visibility: Public
type = foo.Foo
signature = KtFunctionLikeSignature:
receiverType = kotlin.Any
returnType = kotlin.Unit
symbol = foo/myRun(<extension receiver>: kotlin.Any): kotlin.Unit
valueParameters = []
callableIdIfNonLocal = foo/myRun
typeArgumentsMapping = {}
argumentMapping = {}
isInBestCandidates = true
KtApplicableCallCandidateInfo:
candidate = KtSimpleFunctionCall:
isImplicitInvoke = false
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = null
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
returnType = kotlin.Unit
symbol = foo/myRun(): kotlin.Unit
valueParameters = []
callableIdIfNonLocal = foo/myRun
typeArgumentsMapping = {}
argumentMapping = {}
isInBestCandidates = false