| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/extension_types/simple_show_hide.dart:9:3: Error: Undefined name 'e2'. |
| // e2.floor(); // 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: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: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: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 show-types core::num { |
| } |
| extension E2 on core::int show-types core::num hide-methods core::int::ceil hide-getters core::int::ceil { |
| } |
| extension E3 on core::int hide-getters core::int::isEven { |
| } |
| extension type MyInt on core::int show-types core::num show-getters core::int::isEven hide-methods core::int::floor hide-getters core::int::floor { |
| get twice = self::MyInt|get#twice; |
| } |
| static method test1(self::E1 e1) → dynamic { |
| e1.{core::num::ceil}(){() → core::int}; |
| invalid-expression "pkg/front_end/testcases/extension_types/simple_show_hide.dart:9:3: Error: Undefined name '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. |
| ^^^^^^" in e1{<unresolved>}.isEven; |
| } |
| 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. |
| ^^^^" in e2{<unresolved>}.ceil(); |
| e2.{core::num::floor}(){() → core::int}; |
| 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. |
| ^^^^^^" in e2{<unresolved>}.isEven; |
| } |
| 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. |
| ^^^^^" in e3{<unresolved>}.isOdd; |
| 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. |
| ^^^^^^" in e3{<unresolved>}.isEven; |
| } |
| static method MyInt|get#twice(lowered final core::int #this) → core::int |
| return 2.{core::num::*}(#this){(core::num) → core::int}; |
| static method test() → dynamic { |
| self::MyInt m = 42; |
| self::MyInt|get#twice(m); |
| m.{core::int::isEven}{core::bool}; |
| m.{core::num::ceil}(){() → core::int}; |
| 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. |
| ^^^^^" in m{<unresolved>}.floor(); |
| } |
| static method main() → dynamic {} |