protected IFeatureLinkingCandidate createCandidate(XAbstractFeatureCall featureCall, final StackedResolvedTypes demandComputedTypes, IIdentifiableElementDescription description) {
if (description.getSyntacticReceiverType() != null) {
return createCandidateWithReceiverType(featureCall, demandComputedTypes, description);
}
ExpressionAwareStackedResolvedTypes resolvedTypes = this.resolvedTypes.pushTypes(featureCall);
ExpressionTypeComputationState state = createExpressionComputationState(featureCall, resolvedTypes);
if (description instanceof ScopeProviderAccess.ErrorDescription) {
ScopeProviderAccess.ErrorDescription errorDescription = (ScopeProviderAccess.ErrorDescription) description;
boolean followUpError = errorDescription.isFollowUpError();
if (followUpError) {
return new FollowUpError(featureCall, state);
}
return new UnresolvableFeatureCall(featureCall, errorDescription.getNode(), description.getName().toString(), state);
} else if (description.isTypeLiteral()) {
return new TypeLiteralLinkingCandidate(featureCall, description, getSingleExpectation(state), state);
} else {
return new FeatureLinkingCandidate(featureCall, description, getSingleExpectation(state), state);
}
}