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 6ed5d4cb199d9d63b6540c727561df51c7ecb80a..590affc97374d1090d30fc04bed1baa267947b26 100644 |
--- a/pkg/analyzer/test/generated/resolver_test.dart |
+++ b/pkg/analyzer/test/generated/resolver_test.dart |
@@ -2358,6 +2358,39 @@ n(int i) {}'''); |
verify([source]); |
} |
+ void test_canBeNullAfterNullAware_methodInvocation() { |
+ Source source = addSource(r''' |
+m(x) { |
+ x?.a.b(); |
+} |
+'''); |
+ computeLibrarySourceErrors(source); |
+ assertErrors(source, [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]); |
+ verify([source]); |
+ } |
+ |
+ void test_canBeNullAfterNullAware_parenthesized() { |
+ Source source = addSource(r''' |
+m(x) { |
+ (x?.a).b; |
+} |
+'''); |
+ computeLibrarySourceErrors(source); |
+ assertErrors(source, [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]); |
+ verify([source]); |
+ } |
+ |
+ void test_canBeNullAfterNullAware_propertyAccess() { |
+ Source source = addSource(r''' |
+m(x) { |
+ x?.a.b; |
+} |
+'''); |
+ computeLibrarySourceErrors(source); |
+ assertErrors(source, [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]); |
+ verify([source]); |
+ } |
+ |
void test_deadCode_deadBlock_conditionalElse() { |
Source source = addSource(r''' |
f() { |