Index: pkg/analyzer/test/generated/static_type_analyzer_test.dart |
diff --git a/pkg/analyzer/test/generated/static_type_analyzer_test.dart b/pkg/analyzer/test/generated/static_type_analyzer_test.dart |
index 23fac6b9a5fcbe38d929dfc2a73f5eb13ded6ed6..27952361c5494b9b3ce3f403a8e3dbbe398ae379 100644 |
--- a/pkg/analyzer/test/generated/static_type_analyzer_test.dart |
+++ b/pkg/analyzer/test/generated/static_type_analyzer_test.dart |
@@ -394,6 +394,19 @@ class StaticTypeAnalyzerTest extends EngineTestCase { |
validate(TokenType.TILDE_SLASH_EQ); |
} |
+ void test_visitAssignmentExpression_compound_lazy() { |
+ validate(TokenType operator) { |
+ InterfaceType boolType = _typeProvider.boolType; |
+ SimpleIdentifier identifier = _resolvedVariable(boolType, "b"); |
+ AssignmentExpression node = AstFactory.assignmentExpression( |
+ identifier, operator, _resolvedBool(true)); |
+ expect(_analyze(node), same(boolType)); |
+ _listener.assertNoErrors(); |
+ } |
+ validate(TokenType.AMPERSAND_AMPERSAND_EQ); |
+ validate(TokenType.BAR_BAR_EQ); |
+ } |
+ |
void test_visitAssignmentExpression_compound_plusID() { |
validate(TokenType operator) { |
InterfaceType numType = _typeProvider.numType; |
@@ -1565,6 +1578,16 @@ class StaticTypeAnalyzerTest extends EngineTestCase { |
} |
/** |
+ * Return a boolean literal with the given [value] that has been resolved to |
+ * the correct type. |
+ */ |
+ BooleanLiteral _resolvedBool(bool value) { |
+ BooleanLiteral literal = AstFactory.booleanLiteral(value); |
+ literal.staticType = _typeProvider.intType; |
+ return literal; |
+ } |
+ |
+ /** |
* Return an integer literal that has been resolved to the correct type. |
* |
* @param value the value of the literal |