| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:5:17: Error: A extension declaration must have a body, even if it is empty. |
| // Try adding an empty body. |
| // extension E1 on int show num {} |
| // ^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:5:26: Error: A function declaration needs an explicit list of parameters. |
| // Try adding a parameter list to the function declaration. |
| // extension E1 on int show num {} |
| // ^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:17: Error: A extension declaration must have a body, even if it is empty. |
| // Try adding an empty body. |
| // extension E2 on int show num hide ceil {} |
| // ^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:26: Error: Expected ';' after this. |
| // extension E2 on int show num hide ceil {} |
| // ^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:26: Error: 'num' is already declared in this scope. |
| // extension E2 on int show num hide ceil {} |
| // ^^^ |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:5:26: Context: Previous declaration of 'num'. |
| // extension E1 on int show num {} |
| // ^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:35: Error: A function declaration needs an explicit list of parameters. |
| // Try adding a parameter list to the function declaration. |
| // extension E2 on int show num hide ceil {} |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:21:17: Error: A extension declaration must have a body, even if it is empty. |
| // Try adding an empty body. |
| // extension E3 on int hide isEven {} |
| // ^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:21:26: Error: A function declaration needs an explicit list of parameters. |
| // Try adding a parameter list to the function declaration. |
| // extension E3 on int hide isEven {} |
| // ^^^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:25: Error: A extension declaration must have a body, even if it is empty. |
| // Try adding an empty body. |
| // extension type MyInt on int show num, isEven hide floor { |
| // ^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:39: Error: Expected ';' after this. |
| // extension type MyInt on int show num, isEven hide floor { |
| // ^^^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:34: Error: 'num' is already declared in this scope. |
| // extension type MyInt on int show num, isEven hide floor { |
| // ^^^ |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:26: Context: Previous declaration of 'num'. |
| // extension E2 on int show num hide ceil {} |
| // ^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:39: Error: 'isEven' is already declared in this scope. |
| // extension type MyInt on int show num, isEven hide floor { |
| // ^^^^^^ |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:21:26: Context: Previous declaration of 'isEven'. |
| // extension E3 on int hide isEven {} |
| // ^^^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:51: Error: A function declaration needs an explicit list of parameters. |
| // Try adding a parameter list to the function declaration. |
| // extension type MyInt on int show num, isEven hide floor { |
| // ^^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:5:21: Error: Type 'show' not found. |
| // extension E1 on int show num {} |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:21: Error: Type 'show' not found. |
| // extension E2 on int show num hide ceil {} |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:30: Error: Type 'hide' not found. |
| // extension E2 on int show num hide ceil {} |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:21:21: Error: Type 'hide' not found. |
| // extension E3 on int hide isEven {} |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:29: Error: Type 'show' not found. |
| // extension type MyInt on int show num, isEven hide floor { |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:46: Error: Type 'hide' not found. |
| // extension type MyInt on int show num, isEven hide floor { |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:9:3: Error: Getter not found: 'e2'. |
| // e2.floor(); // Ok. |
| // ^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:8:6: Error: The method 'ceil' isn't defined for the extension 'E1'. |
| // Try correcting the name to the name of an existing method, or defining a method name 'ceil'. |
| // e1.ceil(); // Ok. |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:10:6: Error: The getter 'isEven' isn't defined for the extension 'E1'. |
| // Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'. |
| // e1.isEven; // Error. |
| // ^^^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:13:21: Error: 'show' isn't a type. |
| // extension E2 on int show num hide ceil {} |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:16:6: Error: The method 'ceil' isn't defined for the extension 'E2'. |
| // Try correcting the name to the name of an existing method, or defining a method name 'ceil'. |
| // e2.ceil(); // Error. |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:17:6: Error: The method 'floor' isn't defined for the extension 'E2'. |
| // Try correcting the name to the name of an existing method, or defining a method name 'floor'. |
| // e2.floor(); // Ok. |
| // ^^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:18:6: Error: The getter 'isEven' isn't defined for the extension 'E2'. |
| // Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'. |
| // e2.isEven; // Error. |
| // ^^^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:24:6: Error: The getter 'isOdd' isn't defined for the extension 'E3'. |
| // Try correcting the name to the name of an existing getter, or defining a getter or field named 'isOdd'. |
| // e3.isOdd; // Ok. |
| // ^^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:25:6: Error: The getter 'isEven' isn't defined for the extension 'E3'. |
| // Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'. |
| // e3.isEven; // Error. |
| // ^^^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:28:29: Error: 'show' isn't a type. |
| // extension type MyInt on int show num, isEven hide floor { |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:29:7: Error: Expected ';' after this. |
| // int get twice => 2 * this; |
| // ^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:29:17: Error: A function declaration needs an explicit list of parameters. |
| // Try adding a parameter list to the function declaration. |
| // int get twice => 2 * this; |
| // ^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:29:24: Error: Expected identifier, but got 'this'. |
| // int get twice => 2 * this; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:34:5: Error: The getter 'twice' isn't defined for the extension 'MyInt'. |
| // Try correcting the name to the name of an existing getter, or defining a getter or field named 'twice'. |
| // m.twice; // OK, in the extension type. |
| // ^^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:35:5: Error: The getter 'isEven' isn't defined for the extension 'MyInt'. |
| // Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'. |
| // m.isEven; // OK, a shown instance member. |
| // ^^^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:36:5: Error: The method 'ceil' isn't defined for the extension 'MyInt'. |
| // Try correcting the name to the name of an existing method, or defining a method name 'ceil'. |
| // m.ceil(); // OK, a shown instance member. |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:38:5: Error: The method 'floor' isn't defined for the extension 'MyInt'. |
| // Try correcting the name to the name of an existing method, or defining a method name 'floor'. |
| // m.floor(); // Error, hidden. |
| // ^^^^^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| extension E1 on core::int { |
| } |
| extension E2 on core::int { |
| } |
| extension E3 on core::int { |
| } |
| extension type MyInt on core::int { |
| } |
| static method num() → invalid-type {} |
| static method test1(self::E1 e1) → dynamic { |
| invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:8:6: Error: The method 'ceil' isn't defined for the extension 'E1'. |
| Try correcting the name to the name of an existing method, or defining a method name 'ceil'. |
| e1.ceil(); // Ok. |
| ^^^^"; |
| invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:9:3: Error: Getter not found: 'e2'. |
| e2.floor(); // Ok. |
| ^^"{dynamic}.floor(); |
| invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:10:6: Error: The getter 'isEven' isn't defined for the extension 'E1'. |
| Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'. |
| e1.isEven; // Error. |
| ^^^^^^"; |
| } |
| static method ceil() → invalid-type {} |
| static method test2(self::E2 e2) → dynamic { |
| invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:16:6: Error: The method 'ceil' isn't defined for the extension 'E2'. |
| Try correcting the name to the name of an existing method, or defining a method name 'ceil'. |
| e2.ceil(); // Error. |
| ^^^^"; |
| invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:17:6: Error: The method 'floor' isn't defined for the extension 'E2'. |
| Try correcting the name to the name of an existing method, or defining a method name 'floor'. |
| e2.floor(); // Ok. |
| ^^^^^"; |
| invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:18:6: Error: The getter 'isEven' isn't defined for the extension 'E2'. |
| Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'. |
| e2.isEven; // Error. |
| ^^^^^^"; |
| } |
| static method isEven() → invalid-type {} |
| static method test3(self::E3 e3) → dynamic { |
| invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:24:6: Error: The getter 'isOdd' isn't defined for the extension 'E3'. |
| Try correcting the name to the name of an existing getter, or defining a getter or field named 'isOdd'. |
| e3.isOdd; // Ok. |
| ^^^^^"; |
| invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:25:6: Error: The getter 'isEven' isn't defined for the extension 'E3'. |
| Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'. |
| e3.isEven; // Error. |
| ^^^^^^"; |
| } |
| static method floor() → invalid-type { |
| core::int get; |
| function twice() → core::num |
| return 2.{core::num::*}(invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:29:24: Error: Expected identifier, but got 'this'. |
| int get twice => 2 * this; |
| ^^^^" as{TypeError,ForDynamic,ForNonNullableByDefault} core::num){(core::num) → core::num}; |
| } |
| static method test() → dynamic { |
| self::MyInt m = 42; |
| invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:34:5: Error: The getter 'twice' isn't defined for the extension 'MyInt'. |
| Try correcting the name to the name of an existing getter, or defining a getter or field named 'twice'. |
| m.twice; // OK, in the extension type. |
| ^^^^^"; |
| invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:35:5: Error: The getter 'isEven' isn't defined for the extension 'MyInt'. |
| Try correcting the name to the name of an existing getter, or defining a getter or field named 'isEven'. |
| m.isEven; // OK, a shown instance member. |
| ^^^^^^"; |
| invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:36:5: Error: The method 'ceil' isn't defined for the extension 'MyInt'. |
| Try correcting the name to the name of an existing method, or defining a method name 'ceil'. |
| m.ceil(); // OK, a shown instance member. |
| ^^^^"; |
| m.{core::Object::toString}(){() → core::String}; |
| invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:38:5: Error: The method 'floor' isn't defined for the extension 'MyInt'. |
| Try correcting the name to the name of an existing method, or defining a method name 'floor'. |
| m.floor(); // Error, hidden. |
| ^^^^^"; |
| } |
| static method main() → dynamic {} |