blob: cd824ab90cc6de75bf35cdacdf74260b22719dbc [file] [log] [blame]
library test;
import self as self;
import "dart:core" as core;
class C<T extends core::Object = dynamic> extends core::Object {
generic-covariant-impl generic-covariant-interface field self::C::T t = null;
constructor _() void
: super core::Object::•()
;
static factory •<T extends core::Object = dynamic>(self::C::•::T t) self::C<self::C::•::T> {
self::C<self::C::•::T> x = new self::C::_<self::C::•::T>();
x.{self::C::t} = t;
return x;
}
}
static method test() dynamic {
self::C<core::int> x = self::C::•<core::int>(42);
x.{self::C::t} = let final dynamic #t1 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart:22:56: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::int'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::int'.
x. /*@target=C::t*/ t = /*error:INVALID_ASSIGNMENT*/ 'hello';
^" in let final core::String #t2 = "hello" in null;
}
static method main() → dynamic {}