| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/general/invalid_setter_return_type.dart:5:1: Error: The return type of the setter must be 'void' or absent. |
| // Try removing the return type, or define a method rather than a setter. |
| // int set setter1(_) {} // error |
| // ^ |
| // |
| // pkg/front_end/testcases/general/invalid_setter_return_type.dart:6:1: Error: The return type of the setter must be 'void' or absent. |
| // Try removing the return type, or define a method rather than a setter. |
| // dynamic set setter2(_) {} // error |
| // ^ |
| // |
| // pkg/front_end/testcases/general/invalid_setter_return_type.dart:11:3: Error: The return type of the setter must be 'void' or absent. |
| // Try removing the return type, or define a method rather than a setter. |
| // int set setter1(_) {} // error |
| // ^ |
| // |
| // pkg/front_end/testcases/general/invalid_setter_return_type.dart:12:3: Error: The return type of the operator []= must be 'void'. |
| // Try changing the return type to 'void'. |
| // int operator []=(a, b) {} // error |
| // ^ |
| // |
| // pkg/front_end/testcases/general/invalid_setter_return_type.dart:16:3: Error: The return type of the setter must be 'void' or absent. |
| // Try removing the return type, or define a method rather than a setter. |
| // dynamic set setter2(_) {} // error |
| // ^ |
| // |
| // pkg/front_end/testcases/general/invalid_setter_return_type.dart:17:3: Error: The return type of the operator []= must be 'void'. |
| // Try changing the return type to 'void'. |
| // dynamic operator []=(a, b) {} // error |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| class Class1 extends core::Object { |
| synthetic constructor •() → self::Class1 |
| : super core::Object::•() |
| ; |
| set setter1(dynamic _) → void {} |
| operator []=(dynamic a, dynamic b) → void {} |
| } |
| class Class2 extends core::Object { |
| synthetic constructor •() → self::Class2 |
| : super core::Object::•() |
| ; |
| set setter2(dynamic _) → void {} |
| operator []=(dynamic a, dynamic b) → void {} |
| } |
| class Class3 extends core::Object { |
| synthetic constructor •() → self::Class3 |
| : super core::Object::•() |
| ; |
| set setter3(dynamic _) → void {} |
| operator []=(dynamic a, dynamic b) → void {} |
| } |
| class Class4 extends core::Object { |
| synthetic constructor •() → self::Class4 |
| : super core::Object::•() |
| ; |
| set setter4(dynamic _) → void {} |
| operator []=(dynamic a, dynamic b) → void {} |
| } |
| static set setter1(dynamic _) → void {} |
| static set setter2(dynamic _) → void {} |
| static set setter3(dynamic _) → void {} |
| static set setter4(dynamic _) → void {} |
| static method main() → dynamic {} |