returned right type if there was only one failed candidate property
This commit is contained in:
+5
-1
@@ -609,7 +609,11 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
|||||||
checkSuper(receiver, resultingDescriptor, context.trace, selectorExpression);
|
checkSuper(receiver, resultingDescriptor, context.trace, selectorExpression);
|
||||||
return resultingDescriptor.getType();
|
return resultingDescriptor.getType();
|
||||||
}
|
}
|
||||||
if (resolutionResult.isAmbiguity() || resolutionResult.isSingleResult()) {
|
if (resolutionResult.singleResult()) {
|
||||||
|
temporaryTrace.commit();
|
||||||
|
return resolutionResult.getResultingDescriptor().getReturnType();
|
||||||
|
}
|
||||||
|
if (resolutionResult.isAmbiguity()) {
|
||||||
temporaryTrace.commit();
|
temporaryTrace.commit();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user