blob: 9e7b8a7e2c3b0e7eed33f92748a93e18fec48689 [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/infer_type_on_overridden_fields4.dart:17:69: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
// Try changing the type of the left hand side, or casting the right hand side to 'String'.
// String y = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::x*/ x;
// ^
//
import self as self;
import "dart:core" as core;
class A extends core::Object {
final field core::int x = 2;
synthetic constructor •() self::A
: super core::Object::•()
;
}
class B extends core::Object implements self::A {
synthetic constructor •() self::B
: super core::Object::•()
;
get x() core::int
return 3;
}
static method foo() dynamic {
core::String y = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_type_on_overridden_fields4.dart:17:69: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
Try changing the type of the left hand side, or casting the right hand side to 'String'.
String y = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::x*/ x;
^" in new self::B::•().{self::B::x} as{TypeError} core::String;
core::int z = new self::B::•().{self::B::x};
}
static method main() → dynamic {}