Index: pkg/analyzer/lib/src/generated/error_verifier.dart |
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart |
index 6d4177b0f0e79829e10c2498d14eeead68461ac9..d1cbb72bff5931cf02461eee199ad3906df13236 100644 |
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart |
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart |
@@ -4065,18 +4065,8 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> { |
if (lhs == null) { |
return; |
} |
- VariableElement leftVariableElement = getVariableElement(lhs); |
- DartType leftType = (leftVariableElement == null) |
- ? getStaticType(lhs) |
- : leftVariableElement.type; |
- MethodElement invokedMethod = assignment.staticElement; |
- if (invokedMethod == null) { |
- return; |
- } |
- DartType rightType = invokedMethod.type.returnType; |
- if (leftType == null || rightType == null) { |
- return; |
- } |
+ DartType leftType = getStaticType(lhs); |
+ DartType rightType = getStaticType(assignment); |
if (!_typeSystem.isAssignableTo(rightType, leftType)) { |
_errorReporter.reportTypeErrorForNode( |
StaticTypeWarningCode.INVALID_ASSIGNMENT, rhs, [rightType, leftType]); |