Index: pkg/analyzer/test/generated/resolver_test.dart |
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart |
index 7ba6e181e6ac64c29e865b4904f67c8358d014cd..d3e9748b57d0cb35e82030381fc9be30d980ec97 100644 |
--- a/pkg/analyzer/test/generated/resolver_test.dart |
+++ b/pkg/analyzer/test/generated/resolver_test.dart |
@@ -9892,6 +9892,24 @@ class StaticTypeAnalyzerTest extends EngineTestCase { |
_listener.assertNoErrors(); |
} |
+ void test_visitAssignmentExpression_compoundIfNull_differentTypes() { |
+ // double d; d ??= 0 |
+ Expression node = AstFactory.assignmentExpression( |
+ _resolvedVariable(_typeProvider.doubleType, 'd'), |
+ TokenType.QUESTION_QUESTION_EQ, _resolvedInteger(0)); |
+ expect(_analyze(node), same(_typeProvider.numType)); |
+ _listener.assertNoErrors(); |
+ } |
+ |
+ void test_visitAssignmentExpression_compoundIfNull_sameTypes() { |
+ // int i; i ??= 0 |
+ Expression node = AstFactory.assignmentExpression( |
+ _resolvedVariable(_typeProvider.intType, 'i'), |
+ TokenType.QUESTION_QUESTION_EQ, _resolvedInteger(0)); |
+ expect(_analyze(node), same(_typeProvider.intType)); |
+ _listener.assertNoErrors(); |
+ } |
+ |
void test_visitAssignmentExpression_simple() { |
// i = 0 |
InterfaceType intType = _typeProvider.intType; |