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 4290c02d337a7bc50ea1b38f18736007d52b4570..1825c3cc039f672767d3c7652e65fc8c09f88a5f 100644 |
--- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart |
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart |
@@ -1066,17 +1066,6 @@ f(B<A> b) {}''', |
[StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]); |
} |
- test_returnOfInvalidType_async_future_int_mismatches_future_null() async { |
- await assertErrorsInCode( |
- ''' |
-import 'dart:async'; |
-Future<Null> f() async { |
- return 5; |
-} |
-''', |
- [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]); |
- } |
- |
test_returnOfInvalidType_async_future_int_mismatches_future_string() async { |
await assertErrorsInCode( |
''' |
@@ -1928,6 +1917,19 @@ f(Object o) { |
[StaticTypeWarningCode.UNDEFINED_METHOD]); |
} |
+ test_undefinedMethod_ofNull() async { |
+ // TODO(scheglov) Track https://github.com/dart-lang/sdk/issues/28430 to |
+ // decide whether a warning should be reported here. |
+ await assertErrorsInCode( |
+ r''' |
+Null f(int x) => null; |
+main() { |
+ f(42).abs(); |
+} |
+''', |
+ [StaticTypeWarningCode.UNDEFINED_METHOD]); |
+ } |
+ |
test_undefinedMethod_private() async { |
addNamedSource( |
"/lib.dart", |