blob: c3a99bcf3eb25aecaa44234c0a80eb7886e2c87d [file] [log] [blame]
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 = let final<BottomType> #t1 = 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();
^" in new self::D::•().{self::D::fieldB}();
dynamic callGetB = let final<BottomType> #t2 = 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();
^" in new self::D::•().{self::D::getB}();
}
static method main() → dynamic {}