blob: 175ca7d40ef8ec9619b4745109a9378f803bc1bb [file] [log] [blame]
library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
import "infer_types_on_generic_instantiations_in_library_cycle.dart" as test;
import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle.dart";
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, core::int) core::String f) test::A<self::I::E%>;
}
static method main() dynamic {}
library test /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart:27:29: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// . /*@target=A.value*/ value;
// ^
//
import self as test;
import "dart:core" as core;
import "infer_types_on_generic_instantiations_in_library_cycle_a.dart" as self;
import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle_a.dart";
abstract class A<E extends core::Object? = dynamic> extends core::Object implements self::I<test::A::E%> {
final field test::A::E% value = throw "";
synthetic constructor •() test::A<test::A::E%>
: super core::Object::•()
;
}
abstract class M extends core::Object {
final field core::int y = 0;
synthetic constructor •() test::M
: super core::Object::•()
;
}
class B<E extends core::Object? = dynamic> extends test::A<test::B::E%> implements test::M {
synthetic constructor •() test::B<test::B::E%>
: super test::A::•()
;
get y() core::int
return 0;
method m(dynamic a, (dynamic, core::int) dynamic f) test::A<test::B::E%>
return throw "";
}
static method foo() dynamic {
core::int y = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart:27:29: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
. /*@target=A.value*/ value;
^" in new test::B::•<core::String>().{test::B::m}(throw "", throw ""){(dynamic, (dynamic, core::int) dynamic) test::A<core::String>}.{test::A::value}{core::String} as{TypeError,ForNonNullableByDefault} core::int;
core::String z = new test::B::•<core::String>().{test::B::m}(throw "", throw ""){(dynamic, (dynamic, core::int) dynamic) test::A<core::String>}.{test::A::value}{core::String};
}
static method main() dynamic {}