blob: ea5540488788e3d8f2c1f6d3f581a848e1988952 [file] [log] [blame]
library test;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_5.dart:30:26: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// . /*@target=B::m*/ m(null, null);
// ^
//
import self as self;
import "dart:core" as core;
abstract class I<E extends core::Object = dynamic> extends core::Object {
synthetic constructor •() self::I<self::I::E>
: super core::Object::•()
;
abstract method m(dynamic a, (dynamic, self::I::E) core::String f) core::String;
}
abstract class A<E extends core::Object = dynamic> extends core::Object implements self::I<self::A::E> {
const constructor •() self::A<self::A::E>
: super core::Object::•()
;
abstract method m(dynamic a, (dynamic, self::A::E) core::String f) core::String;
}
abstract class M extends core::Object {
final field core::int y = 0;
synthetic constructor •() self::M
: super core::Object::•()
;
}
class B<E extends core::Object = dynamic> extends self::A<self::B::E> implements self::M {
const constructor •() self::B<self::B::E>
: super self::A::•()
;
get y() core::int
return 0;
method m(dynamic a, (dynamic, self::B::E) dynamic f) core::String {}
}
static method foo() dynamic {
core::int y = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_5.dart:30:26: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
. /*@target=B::m*/ m(null, null);
^" in new self::B::•<dynamic>().{self::B::m}(null, null) as{TypeError} core::int;
core::String z = new self::B::•<dynamic>().{self::B::m}(null, null);
}
static method main() → dynamic {}