| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/general/type_parameter_type_named_int.dart:13:12: Error: A value of type 'List<int/*1*/>' can't be assigned to a variable of type 'List<int/*2*/>'. |
| // - 'List' is from 'dart:core'. |
| // - 'int/*1*/' is from 'pkg/front_end/testcases/general/type_parameter_type_named_int.dart'. |
| // - 'int/*2*/' is from 'dart:core'. |
| // list = value; |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| abstract class Foo<T extends core::Object? = dynamic> extends core::Object { |
| synthetic constructor •() → self::Foo<self::Foo::T%> |
| : super core::Object::•() |
| ; |
| abstract get list() → core::List<self::Foo::T%>; |
| abstract method setList<T extends core::Object? = dynamic>(core::List<self::Foo::setList::T%> value) → void; |
| } |
| class Bar extends core::Object implements self::Foo<core::int> { |
| late field core::List<core::int> list; |
| synthetic constructor •() → self::Bar |
| : super core::Object::•() |
| ; |
| method setList<int extends core::Object? = dynamic>(core::List<self::Bar::setList::int%> value) → void { |
| this.{self::Bar::list} = invalid-expression "pkg/front_end/testcases/general/type_parameter_type_named_int.dart:13:12: Error: A value of type 'List<int/*1*/>' can't be assigned to a variable of type 'List<int/*2*/>'. |
| - 'List' is from 'dart:core'. |
| - 'int/*1*/' is from 'pkg/front_end/testcases/general/type_parameter_type_named_int.dart'. |
| - 'int/*2*/' is from 'dart:core'. |
| list = value; |
| ^" in value as{TypeError,ForNonNullableByDefault} core::List<core::int>; |
| } |
| } |