| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/extension_types/access_setter_as_getter.dart:16:5: Error: The getter 'foo' isn't defined for the extension 'E'. |
| // Try correcting the name to the name of an existing getter, or defining a getter or field named 'foo'. |
| // e.foo; // Error. |
| // ^^^ |
| // |
| // pkg/front_end/testcases/extension_types/access_setter_as_getter.dart:17:5: Error: The setter 'bar' isn't defined for the extension 'E'. |
| // Try correcting the name to the name of an existing setter, or defining a setter or field named 'bar'. |
| // e.bar = 42; // Error. |
| // ^^^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| class A extends core::Object { |
| synthetic constructor •() → self::A |
| : super core::Object::•() |
| ; |
| } |
| extension E on self::A { |
| get bar = self::E|get#bar; |
| set foo = self::E|set#foo; |
| } |
| static method E|set#foo(lowered final self::A #this, core::int value) → void {} |
| static method E|get#bar(lowered final self::A #this) → core::int |
| return 42; |
| static method test(self::E e) → dynamic { |
| self::E|set#foo(e, 42); |
| self::E|get#bar(e); |
| invalid-expression "pkg/front_end/testcases/extension_types/access_setter_as_getter.dart:16:5: Error: The getter 'foo' isn't defined for the extension 'E'. |
| Try correcting the name to the name of an existing getter, or defining a getter or field named 'foo'. |
| e.foo; // Error. |
| ^^^" in e{<unresolved>}.foo; |
| invalid-expression "pkg/front_end/testcases/extension_types/access_setter_as_getter.dart:17:5: Error: The setter 'bar' isn't defined for the extension 'E'. |
| Try correcting the name to the name of an existing setter, or defining a setter or field named 'bar'. |
| e.bar = 42; // Error. |
| ^^^" in e{<unresolved>}.bar = 42; |
| } |
| static method main() → dynamic {} |