Index: pkg/analyzer/lib/src/generated/static_type_analyzer.dart |
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart |
index d1997f3f0495f933b7d00c8740fd4edde86a7c5e..a78311fcd86a8d81b2602191ac34b6c0ddfc877d 100644 |
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart |
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart |
@@ -157,6 +157,11 @@ class StaticTypeAnalyzer extends SimpleAstVisitor<Object> { |
overrideType = propagatedType; |
} |
_resolver.overrideExpression(node.leftHandSide, overrideType, true); |
+ } else if (operator == sc.TokenType.QUESTION_QUESTION_EQ) { |
+ // The static type of a compound assignment using ??= is the least upper |
+ // bound of the static types of the LHS and RHS. |
+ _analyzeLeastUpperBound(node, node.leftHandSide, node.rightHandSide); |
+ return null; |
} else { |
ExecutableElement staticMethodElement = node.staticElement; |
DartType staticType = _computeStaticReturnType(staticMethodElement); |