Fixed message for TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH error

This commit is contained in:
Svetlana Isakova
2014-12-17 15:34:57 +03:00
parent 7b09e85717
commit 9d09a4d1b4
4 changed files with 21 additions and 1 deletions
@@ -225,7 +225,8 @@ public abstract class AbstractTracingStrategy implements TracingStrategy {
ConstraintSystem systemWithoutExpectedTypeConstraint =
((ConstraintSystemImpl) constraintSystem).filterConstraintsOut(EXPECTED_TYPE_POSITION.position());
JetType substitutedReturnType = systemWithoutExpectedTypeConstraint.getResultingSubstitutor().substitute(declaredReturnType, Variance.INVARIANT);
JetType substitutedReturnType = systemWithoutExpectedTypeConstraint.getResultingSubstitutor().substitute(
declaredReturnType, Variance.OUT_VARIANCE);
assert substitutedReturnType != null; //todo
assert !noExpectedType(data.expectedType) : "Expected type doesn't exist, but there is an expected type mismatch error";