Index: pkg/analyzer/test/generated/static_type_warning_code_test.dart |
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_test.dart |
index 019c07eff67ade35090dadeaca0d3567ce30a1ce..02eca6e174b7399266ec1b10e455e0a409126d9a 100644 |
--- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart |
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart |
@@ -355,6 +355,21 @@ main() { |
verify([source]); |
} |
+ void test_invalidAssignment_ifNullAssignment() { |
+ AnalysisOptionsImpl options = new AnalysisOptionsImpl(); |
+ options.enableNullAwareOperators = true; |
+ resetWithOptions(options); |
+ Source source = addSource(''' |
+void f(int i) { |
+ double d; |
+ d ??= i; |
+} |
+'''); |
+ resolve(source); |
+ assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]); |
+ verify([source]); |
+ } |
+ |
void test_invalidAssignment_instanceVariable() { |
Source source = addSource(r''' |
class A { |