IDELightClassContexts: Use CallResolver to resolve relevant annotation calls

Drop code that made decisions based on text
Use CallResolver directly to avoid calling TypeResolver which only returns error types in ad hoc resolve
This commit is contained in:
Pavel V. Talanov
2017-04-24 14:51:41 +03:00
parent 46c6aaddeb
commit 337eb883b3
2 changed files with 27 additions and 61 deletions
@@ -346,6 +346,15 @@ public class CallResolver {
return checkArgumentTypesAndFail(context);
}
return resolveConstructorCall(context, functionReference, constructedType);
}
@NotNull
public OverloadResolutionResults<ConstructorDescriptor> resolveConstructorCall(
@NotNull BasicCallResolutionContext context,
@NotNull KtReferenceExpression functionReference,
@NotNull KotlinType constructedType
) {
Pair<Collection<ResolutionCandidate<ConstructorDescriptor>>, BasicCallResolutionContext> candidatesAndContext =
prepareCandidatesAndContextForConstructorCall(constructedType, context);