| library test; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/inference/call_corner_cases.dart:27:71: Error: 'fieldB' isn't a function or method and can't be invoked. |
| // var /*@ type=dynamic */ callFieldB = new D(). /*@target=D::fieldB*/ fieldB(); |
| // ^ |
| // |
| // pkg/front_end/testcases/inference/call_corner_cases.dart:28:67: Error: 'getB' isn't a function or method and can't be invoked. |
| // var /*@ type=dynamic */ callGetB = new D(). /*@target=D::getB*/ getB(); |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| class A extends core::Object { |
| synthetic constructor •() → self::A* |
| : super core::Object::•() |
| ; |
| method call() → core::int* |
| return 0; |
| } |
| class B extends core::Object { |
| synthetic constructor •() → self::B* |
| : super core::Object::•() |
| ; |
| get call() → self::A* |
| return new self::A::•(); |
| } |
| class D extends core::Object { |
| field self::A* fieldA = new self::A::•(); |
| field self::B* fieldB = new self::B::•(); |
| synthetic constructor •() → self::D* |
| : super core::Object::•() |
| ; |
| get getA() → self::A* |
| return new self::A::•(); |
| get getB() → self::B* |
| return new self::B::•(); |
| } |
| static method test() → dynamic { |
| core::int* callA = new self::A::•().{self::A::call}(); |
| core::int* callFieldA = new self::D::•().{self::D::fieldA}(); |
| core::int* callGetA = new self::D::•().{self::D::getA}(); |
| dynamic callFieldB = invalid-expression "pkg/front_end/testcases/inference/call_corner_cases.dart:27:71: Error: 'fieldB' isn't a function or method and can't be invoked. |
| var /*@ type=dynamic */ callFieldB = new D(). /*@target=D::fieldB*/ fieldB(); |
| ^"; |
| dynamic callGetB = invalid-expression "pkg/front_end/testcases/inference/call_corner_cases.dart:28:67: Error: 'getB' isn't a function or method and can't be invoked. |
| var /*@ type=dynamic */ callGetB = new D(). /*@target=D::getB*/ getB(); |
| ^"; |
| } |
| static method main() → dynamic {} |