fixed bug in renderer for violated upper bound error
This commit is contained in:
committed by
Andrey Breslav
parent
c3ff6a2430
commit
4657a4b271
@@ -267,7 +267,8 @@ public class Renderers {
|
||||
|
||||
TypeParameterDescriptor typeParameterDescriptor = null;
|
||||
ConstraintSystemImpl constraintSystem = (ConstraintSystemImpl) inferenceErrorData.constraintSystem;
|
||||
assert constraintSystem.getStatus().hasViolatedUpperBound();
|
||||
ConstraintSystemStatus status = constraintSystem.getStatus();
|
||||
assert status.hasViolatedUpperBound();
|
||||
|
||||
ConstraintSystem systemWithoutWeakConstraints = constraintSystem.getSystemWithoutWeakConstraints();
|
||||
for (TypeParameterDescriptor typeParameter : inferenceErrorData.descriptor.getTypeParameters()) {
|
||||
@@ -275,6 +276,9 @@ public class Renderers {
|
||||
typeParameterDescriptor = typeParameter;
|
||||
}
|
||||
}
|
||||
if (typeParameterDescriptor == null && status.hasConflictingConstraints()) {
|
||||
return renderConflictingSubstitutionsInferenceError(inferenceErrorData, result);
|
||||
}
|
||||
assert typeParameterDescriptor != null : errorMessage;
|
||||
|
||||
JetType inferredValueForTypeParameter = systemWithoutWeakConstraints.getTypeBounds(typeParameterDescriptor).getValue();
|
||||
|
||||
Reference in New Issue
Block a user