| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/general/extension_methods.dart:19:26: Error: The getter 'two' isn't defined for the class 'C'. |
| // - 'C' is from 'pkg/front_end/testcases/general/extension_methods.dart'. |
| // Try correcting the name to the name of an existing getter, or defining a getter or field named 'two'. |
| // var result = c.one + c.two; |
| // ^^^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| import "package:expect/expect.dart" as exp; |
| |
| import "package:expect/expect.dart"; |
| |
| class C extends core::Object { |
| synthetic constructor •() → self::C* |
| : super core::Object::•() |
| ; |
| get one() → core::int* |
| return 1; |
| } |
| class E extends core::Object { |
| } |
| method E|two(final self::C* #this) → core::int* |
| return 2; |
| static method main() → dynamic { |
| self::C* c = new self::C::•(); |
| core::num* result = c.{self::C::one}.{core::num::+}(invalid-expression "pkg/front_end/testcases/general/extension_methods.dart:19:26: Error: The getter 'two' isn't defined for the class 'C'. |
| - 'C' is from 'pkg/front_end/testcases/general/extension_methods.dart'. |
| Try correcting the name to the name of an existing getter, or defining a getter or field named 'two'. |
| var result = c.one + c.two; |
| ^^^" as{TypeError} core::num*); |
| exp::Expect::equals(result, 3); |
| } |