| 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 e502906275cafa399ff113cb2b69bb7a0d5023c2..2c1e2d27c818dd146f32f6133187f1ceba5ab373 100644
|
| --- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart
|
| +++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
|
| @@ -1122,7 +1122,8 @@ class A<T extends T> {
|
| 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) {
|
| @@ -1151,7 +1152,8 @@ 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) {
|
| @@ -1162,7 +1164,8 @@ 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) {
|
| @@ -1442,6 +1445,18 @@ var a = A.B;''');
|
| assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
|
| }
|
|
|
| + void test_undefinedGetter_typeLiteral_cascadeTarget() {
|
| + Source source = addSource(r'''
|
| +class T {
|
| + static int get foo => 42;
|
| +}
|
| +main() {
|
| + T..foo;
|
| +}''');
|
| + computeLibrarySourceErrors(source);
|
| + assertErrors(source, [StaticTypeWarningCode.UNDEFINED_GETTER]);
|
| + }
|
| +
|
| void test_undefinedGetter_typeLiteral_conditionalAccess() {
|
| // When applied to a type literal, the conditional access operator '?.'
|
| // cannot be used to access instance getters of Type.
|
| @@ -1613,6 +1628,19 @@ main() {
|
| assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
|
| }
|
|
|
| + void test_undefinedMethod_typeLiteral_cascadeTarget() {
|
| + Source source = addSource('''
|
| +class T {
|
| + static void foo() {}
|
| +}
|
| +main() {
|
| + T..foo();
|
| +}
|
| +''');
|
| + computeLibrarySourceErrors(source);
|
| + assertErrors(source, [StaticTypeWarningCode.UNDEFINED_METHOD]);
|
| + }
|
| +
|
| void test_undefinedMethod_typeLiteral_conditionalAccess() {
|
| // When applied to a type literal, the conditional access operator '?.'
|
| // cannot be used to access instance methods of Type.
|
| @@ -1713,6 +1741,18 @@ f() { A.B = 0;}''');
|
| assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
|
| }
|
|
|
| + void test_undefinedSetter_typeLiteral_cascadeTarget() {
|
| + Source source = addSource(r'''
|
| +class T {
|
| + static void set foo(_) {}
|
| +}
|
| +main() {
|
| + T..foo = 42;
|
| +}''');
|
| + computeLibrarySourceErrors(source);
|
| + assertErrors(source, [StaticTypeWarningCode.UNDEFINED_SETTER]);
|
| + }
|
| +
|
| void test_undefinedSetter_void() {
|
| Source source = addSource(r'''
|
| class T {
|
|
|