| 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 c0ea73e317f54df5009d07c2fbc7356eca3c0236..fc712cef565d9f768f3c52b27d6a20adefa49687 100644
|
| --- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart
|
| +++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
|
| @@ -11,7 +11,6 @@ import 'package:unittest/unittest.dart';
|
| import '../reflective_tests.dart';
|
| import 'resolver_test.dart';
|
|
|
| -
|
| main() {
|
| groupSep = ' | ';
|
| runReflectiveTests(StaticTypeWarningCodeTest);
|
| @@ -87,8 +86,7 @@ main() {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS]);
|
| + source, [StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -99,8 +97,7 @@ main() {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS]);
|
| + source, [StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -111,8 +108,7 @@ main() {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS]);
|
| + source, [StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -121,9 +117,10 @@ main() {
|
| int f() async {}
|
| ''');
|
| resolve(source);
|
| - assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE, HintCode.MISSING_RETURN]);
|
| + assertErrors(source, [
|
| + StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE,
|
| + HintCode.MISSING_RETURN
|
| + ]);
|
| verify([source]);
|
| }
|
|
|
| @@ -133,8 +130,7 @@ int f() async* {}
|
| ''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
|
| + source, [StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
|
| verify([source]);
|
| }
|
|
|
| @@ -146,8 +142,7 @@ class C {
|
| ''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
|
| + source, [StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
|
| verify([source]);
|
| }
|
|
|
| @@ -158,9 +153,10 @@ class C {
|
| }
|
| ''');
|
| resolve(source);
|
| - assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE, HintCode.MISSING_RETURN]);
|
| + assertErrors(source, [
|
| + StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE,
|
| + HintCode.MISSING_RETURN
|
| + ]);
|
| verify([source]);
|
| }
|
|
|
| @@ -170,8 +166,7 @@ int f() sync* {}
|
| ''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
|
| + source, [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
|
| verify([source]);
|
| }
|
|
|
| @@ -183,8 +178,7 @@ class C {
|
| ''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
|
| + source, [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
|
| verify([source]);
|
| }
|
|
|
| @@ -200,8 +194,7 @@ class C implements A, B {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
|
| + source, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
|
| verify([source]);
|
| }
|
|
|
| @@ -216,8 +209,7 @@ abstract class B {
|
| abstract class C implements A, B {}''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
|
| + source, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
|
| verify([source]);
|
| }
|
|
|
| @@ -232,8 +224,7 @@ abstract class B {
|
| abstract class C implements A, B {}''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
|
| + source, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
|
| verify([source]);
|
| }
|
|
|
| @@ -247,8 +238,7 @@ main(A a) {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
|
| + source, [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
|
| verify([source]);
|
| }
|
|
|
| @@ -262,8 +252,7 @@ main(A a) {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
|
| + source, [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
|
| verify([source]);
|
| }
|
|
|
| @@ -277,8 +266,7 @@ main(A a) {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
|
| + source, [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
|
| verify([source]);
|
| }
|
|
|
| @@ -292,8 +280,7 @@ main(A a) {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
|
| + source, [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
|
| verify([source]);
|
| }
|
|
|
| @@ -307,8 +294,7 @@ main(A a) {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
|
| + source, [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
|
| verify([source]);
|
| }
|
|
|
| @@ -510,8 +496,7 @@ f() {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION]);
|
| + source, [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION]);
|
| verify([source]);
|
| }
|
|
|
| @@ -696,11 +681,10 @@ int f() async {
|
| }
|
| ''');
|
| resolve(source);
|
| - assertErrors(
|
| - source,
|
| - [
|
| - StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
|
| - StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE]);
|
| + assertErrors(source, [
|
| + StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
|
| + StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE
|
| + ]);
|
| verify([source]);
|
| }
|
|
|
| @@ -801,8 +785,7 @@ class G<E extends A> {}
|
| class D = G<B> with C;''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -814,8 +797,7 @@ class G<E extends A> {}
|
| class C extends G<B>{}''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -826,8 +808,7 @@ class X<T extends Type> {}
|
| class Y<U> extends X<U> {}''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -842,8 +823,7 @@ class C {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -855,8 +835,7 @@ class G<E extends A> {}
|
| G<B> f() { return null; }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -868,8 +847,7 @@ class G<E extends A> {}
|
| typedef G<B> f();''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -881,8 +859,7 @@ class G<E extends A> {}
|
| f(G<B> h()) {}''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -894,8 +871,7 @@ class G<E extends A> {}
|
| class C implements G<B>{}''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -907,8 +883,7 @@ class G<E extends A> {}
|
| var b = 1 is G<B>;''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -922,8 +897,7 @@ class C {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -935,8 +909,7 @@ class G<E extends A> {}
|
| f() { return new G<B>(); }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -949,8 +922,7 @@ class G<E extends B> {}
|
| f() { return new G<A>(); }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -962,8 +934,7 @@ class G<E extends A> {}
|
| f(G<B> g) {}''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -976,11 +947,10 @@ class X<T extends A> {
|
| factory X.name(int x, int y) = X<B>;
|
| }''');
|
| resolve(source);
|
| - assertErrors(
|
| - source,
|
| - [
|
| - StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
|
| - StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE]);
|
| + assertErrors(source, [
|
| + StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
|
| + StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE
|
| + ]);
|
| verify([source]);
|
| }
|
|
|
| @@ -993,8 +963,7 @@ class D<E extends A> {}
|
| C<D<B>> Var;''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1007,8 +976,7 @@ class G<E extends A> {}
|
| class D<F extends G<B>> {}''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1020,8 +988,7 @@ class G<E extends A> {}
|
| G<B> g;''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1033,8 +1000,7 @@ class G<E extends A> {}
|
| class C extends Object with G<B>{}''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| + source, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1044,13 +1010,11 @@ class A<T extends T> {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND]);
|
| + source, [StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND]);
|
| verify([source]);
|
| }
|
|
|
| - void
|
| - test_typePromotion_booleanAnd_useInRight_accessedInClosureRight_mutated() {
|
| + void test_typePromotion_booleanAnd_useInRight_accessedInClosureRight_mutated() {
|
| Source source = addSource(r'''
|
| callMe(f()) { f(); }
|
| main(Object p) {
|
| @@ -1079,8 +1043,7 @@ main(Object p) {
|
| assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
|
| }
|
|
|
| - void
|
| - test_typePromotion_conditional_useInThen_accessedInClosure_hasAssignment_after() {
|
| + void test_typePromotion_conditional_useInThen_accessedInClosure_hasAssignment_after() {
|
| Source source = addSource(r'''
|
| callMe(f()) { f(); }
|
| main(Object p) {
|
| @@ -1091,8 +1054,7 @@ main(Object p) {
|
| assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
|
| }
|
|
|
| - void
|
| - test_typePromotion_conditional_useInThen_accessedInClosure_hasAssignment_before() {
|
| + void test_typePromotion_conditional_useInThen_accessedInClosure_hasAssignment_before() {
|
| Source source = addSource(r'''
|
| callMe(f()) { f(); }
|
| main(Object p) {
|
| @@ -1370,8 +1332,7 @@ main(A<int> a) {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
|
| + source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1385,8 +1346,7 @@ main(A<int,int> a) {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
|
| + source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1654,9 +1614,9 @@ class B extends A {
|
| }
|
| }''');
|
| resolve(source);
|
| - assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER]);
|
| + assertErrors(source, [
|
| + StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER
|
| + ]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1671,9 +1631,9 @@ class B extends A {
|
| }
|
| }''');
|
| resolve(source);
|
| - assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER]);
|
| + assertErrors(source, [
|
| + StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER
|
| + ]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1688,9 +1648,9 @@ class B extends A {
|
| }
|
| }''');
|
| resolve(source);
|
| - assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER]);
|
| + assertErrors(source, [
|
| + StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER
|
| + ]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1701,8 +1661,7 @@ class M {}
|
| class B<F extends num> = A<F> with M;''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
|
| + source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1712,8 +1671,7 @@ class A<E, F> {}
|
| A<A> a = null;''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
|
| + source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1723,8 +1681,7 @@ class A<E> {}
|
| A<A, A> a = null;''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
|
| + source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1737,8 +1694,7 @@ f(p) {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
|
| + source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1751,8 +1707,7 @@ f(p) {
|
| }''');
|
| resolve(source);
|
| assertErrors(
|
| - source,
|
| - [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
|
| + source, [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1763,11 +1718,10 @@ int f() async* {
|
| }
|
| ''');
|
| resolve(source);
|
| - assertErrors(
|
| - source,
|
| - [
|
| - StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
|
| - StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
|
| + assertErrors(source, [
|
| + StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
|
| + StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE
|
| + ]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1778,11 +1732,10 @@ Iterable<int> f() async* {
|
| }
|
| ''');
|
| resolve(source);
|
| - assertErrors(
|
| - source,
|
| - [
|
| - StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
|
| - StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
|
| + assertErrors(source, [
|
| + StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
|
| + StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE
|
| + ]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1852,11 +1805,10 @@ int f() sync* {
|
| }
|
| ''');
|
| resolve(source);
|
| - assertErrors(
|
| - source,
|
| - [
|
| - StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
|
| - StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
|
| + assertErrors(source, [
|
| + StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
|
| + StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE
|
| + ]);
|
| verify([source]);
|
| }
|
|
|
| @@ -1879,11 +1831,10 @@ Stream<int> f() sync* {
|
| }
|
| ''');
|
| resolve(source);
|
| - assertErrors(
|
| - source,
|
| - [
|
| - StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
|
| - StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
|
| + assertErrors(source, [
|
| + StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
|
| + StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE
|
| + ]);
|
| verify([source]);
|
| }
|
| }
|
|
|