blob: d9beb51f851d86afeebf684226831979362f39ef [file] [log] [blame]
library;
import self as self;
import "dart:core" as core;
import "infer_constraints_from_opt_in_lib.dart" as inf;
import "dart:collection" as col;
import "org-dartlang-testcase:///infer_constraints_from_opt_in_lib.dart";
abstract class A extends core::Object {
synthetic constructor •() self::A*
: super core::Object::•()
;
method baz(inf::B* b) dynamic {
b.{inf::B::foo}(b.{inf::B::bar}<core::List<core::int*>*>());
}
abstract member-signature get _identityHashCode() core::int*; -> core::Object::_identityHashCode
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*; -> core::Object::_instanceOf
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*; -> core::Object::_simpleInstanceOf
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*; -> core::Object::_simpleInstanceOfTrue
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*; -> core::Object::_simpleInstanceOfFalse
abstract member-signature operator ==(dynamic other) core::bool*; -> core::Object::==
abstract member-signature get hashCode() core::int*; -> core::Object::hashCode
abstract member-signature method toString() core::String*; -> core::Object::toString
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() core::Type*; -> core::Object::runtimeType
}
static method main() dynamic {
core::List<dynamic>* local0 = core::_GrowableList::•<dynamic>(0);
core::List<inf::C<dynamic>*>* local1a = core::_GrowableList::_literal1<inf::C<dynamic>*>(inf::field1);
core::List<inf::C<dynamic>*>* local1b = core::_GrowableList::_literal1<inf::C<dynamic>*>(inf::field2);
core::List<inf::C<core::int*>*>* local1c = core::_GrowableList::_literal1<inf::C<core::int*>*>(inf::field3);
core::List<inf::C<core::int*>*>* local1d = core::_GrowableList::_literal1<inf::C<core::int*>*>(inf::field4);
core::List<inf::C<core::int*>*>* local1e = core::_GrowableList::_literal1<inf::C<core::int*>*>(inf::field5);
core::List<inf::C<core::int*>*>* local1f = core::_GrowableList::_literal1<inf::C<core::int*>*>(inf::field6);
core::List<core::int*>* local1g = core::_GrowableList::_literal1<core::int*>(inf::field7);
core::List<core::int*>* local1h = core::_GrowableList::_literal1<core::int*>(inf::field8);
core::List<Null>* local1i = core::_GrowableList::_literal1<Null>(null);
core::Set<inf::C<dynamic>*>* local2a = block {
final core::Set<inf::C<dynamic>*>* #t1 = new col::_CompactLinkedHashSet::•<inf::C<dynamic>*>();
#t1.{core::Set::add}{Invariant}(inf::field1);
#t1.{core::Set::add}{Invariant}(null);
} =>#t1;
core::Set<inf::C<dynamic>*>* local2b = block {
final core::Set<inf::C<dynamic>*>* #t2 = new col::_CompactLinkedHashSet::•<inf::C<dynamic>*>();
#t2.{core::Set::add}{Invariant}(inf::field2);
#t2.{core::Set::add}{Invariant}(null);
} =>#t2;
core::Set<inf::C<core::int*>*>* local2c = block {
final core::Set<inf::C<core::int*>*>* #t3 = new col::_CompactLinkedHashSet::•<inf::C<core::int*>*>();
#t3.{core::Set::add}{Invariant}(inf::field3);
#t3.{core::Set::add}{Invariant}(null);
} =>#t3;
core::Set<inf::C<core::int*>*>* local2d = block {
final core::Set<inf::C<core::int*>*>* #t4 = new col::_CompactLinkedHashSet::•<inf::C<core::int*>*>();
#t4.{core::Set::add}{Invariant}(inf::field4);
#t4.{core::Set::add}{Invariant}(null);
} =>#t4;
core::Set<inf::C<core::int*>*>* local2e = block {
final core::Set<inf::C<core::int*>*>* #t5 = new col::_CompactLinkedHashSet::•<inf::C<core::int*>*>();
#t5.{core::Set::add}{Invariant}(inf::field5);
#t5.{core::Set::add}{Invariant}(null);
} =>#t5;
core::Set<inf::C<core::int*>*>* local2f = block {
final core::Set<inf::C<core::int*>*>* #t6 = new col::_CompactLinkedHashSet::•<inf::C<core::int*>*>();
#t6.{core::Set::add}{Invariant}(inf::field6);
#t6.{core::Set::add}{Invariant}(null);
} =>#t6;
core::Set<core::int*>* local2g = block {
final core::Set<core::int*>* #t7 = new col::_CompactLinkedHashSet::•<core::int*>();
#t7.{core::Set::add}{Invariant}(inf::field7);
#t7.{core::Set::add}{Invariant}(null);
} =>#t7;
core::Set<core::int*>* local2h = block {
final core::Set<core::int*>* #t8 = new col::_CompactLinkedHashSet::•<core::int*>();
#t8.{core::Set::add}{Invariant}(inf::field8);
#t8.{core::Set::add}{Invariant}(null);
} =>#t8;
core::Set<inf::C<dynamic>*>* local3a = block {
final core::Set<inf::C<dynamic>*>* #t9 = new col::_CompactLinkedHashSet::•<inf::C<dynamic>*>();
#t9.{core::Set::add}{Invariant}(null);
#t9.{core::Set::add}{Invariant}(inf::field1);
} =>#t9;
core::Set<inf::C<dynamic>*>* local3b = block {
final core::Set<inf::C<dynamic>*>* #t10 = new col::_CompactLinkedHashSet::•<inf::C<dynamic>*>();
#t10.{core::Set::add}{Invariant}(null);
#t10.{core::Set::add}{Invariant}(inf::field2);
} =>#t10;
core::Set<inf::C<core::int*>*>* local3c = block {
final core::Set<inf::C<core::int*>*>* #t11 = new col::_CompactLinkedHashSet::•<inf::C<core::int*>*>();
#t11.{core::Set::add}{Invariant}(null);
#t11.{core::Set::add}{Invariant}(inf::field3);
} =>#t11;
core::Set<inf::C<core::int*>*>* local3d = block {
final core::Set<inf::C<core::int*>*>* #t12 = new col::_CompactLinkedHashSet::•<inf::C<core::int*>*>();
#t12.{core::Set::add}{Invariant}(null);
#t12.{core::Set::add}{Invariant}(inf::field4);
} =>#t12;
core::Set<inf::C<core::int*>*>* local3e = block {
final core::Set<inf::C<core::int*>*>* #t13 = new col::_CompactLinkedHashSet::•<inf::C<core::int*>*>();
#t13.{core::Set::add}{Invariant}(null);
#t13.{core::Set::add}{Invariant}(inf::field5);
} =>#t13;
core::Set<inf::C<core::int*>*>* local3f = block {
final core::Set<inf::C<core::int*>*>* #t14 = new col::_CompactLinkedHashSet::•<inf::C<core::int*>*>();
#t14.{core::Set::add}{Invariant}(null);
#t14.{core::Set::add}{Invariant}(inf::field6);
} =>#t14;
core::Set<core::int*>* local3g = block {
final core::Set<core::int*>* #t15 = new col::_CompactLinkedHashSet::•<core::int*>();
#t15.{core::Set::add}{Invariant}(null);
#t15.{core::Set::add}{Invariant}(inf::field7);
} =>#t15;
core::Set<core::int*>* local3h = block {
final core::Set<core::int*>* #t16 = new col::_CompactLinkedHashSet::•<core::int*>();
#t16.{core::Set::add}{Invariant}(null);
#t16.{core::Set::add}{Invariant}(inf::field8);
} =>#t16;
}
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd_mixed/infer_constraints_from_opt_in_lib.dart:11:9: Error: Field 'field5' should be initialized because its type 'C<int?>' doesn't allow null.
// - 'C' is from 'pkg/front_end/testcases/nnbd_mixed/infer_constraints_from_opt_in_lib.dart'.
// C<int?> field5;
// ^^^^^^
//
// pkg/front_end/testcases/nnbd_mixed/infer_constraints_from_opt_in_lib.dart:13:5: Error: Field 'field7' should be initialized because its type 'int' doesn't allow null.
// int field7;
// ^^^^^^
//
import self as inf;
import "dart:core" as core;
import "dart:collection" as col;
class C<T extends core::Object? = dynamic> extends core::Object {
synthetic constructor •() inf::C<inf::C::T%>
: super core::Object::•()
;
}
abstract class B extends core::Object {
synthetic constructor •() inf::B
: super core::Object::•()
;
abstract method bar<X extends core::List<core::int?>? = core::List<core::int?>?>() inf::B::bar::X%;
abstract method foo(core::List<core::int> list) dynamic;
}
static field inf::C<dynamic> field1 = new inf::C::•<dynamic>();
static field inf::C<dynamic>? field2;
static field inf::C<core::int> field3 = new inf::C::•<core::int>();
static field inf::C<core::int>? field4;
static field inf::C<core::int?> field5;
static field inf::C<core::int?>? field6;
static field core::int field7;
static field core::int? field8;
static method method() dynamic {
core::List<dynamic> local0 = core::_GrowableList::•<dynamic>(0);
core::List<inf::C<dynamic>> local1a = core::_GrowableList::_literal1<inf::C<dynamic>>(inf::field1);
core::List<inf::C<dynamic>?> local1b = core::_GrowableList::_literal1<inf::C<dynamic>?>(inf::field2);
core::List<inf::C<core::int>> local1c = core::_GrowableList::_literal1<inf::C<core::int>>(inf::field3);
core::List<inf::C<core::int>?> local1d = core::_GrowableList::_literal1<inf::C<core::int>?>(inf::field4);
core::List<inf::C<core::int?>> local1e = core::_GrowableList::_literal1<inf::C<core::int?>>(inf::field5);
core::List<inf::C<core::int?>?> local1f = core::_GrowableList::_literal1<inf::C<core::int?>?>(inf::field6);
core::List<core::int> local1g = core::_GrowableList::_literal1<core::int>(inf::field7);
core::List<core::int?> local1h = core::_GrowableList::_literal1<core::int?>(inf::field8);
core::List<Null> local1i = core::_GrowableList::_literal1<Null>(null);
core::Set<inf::C<dynamic>?> local2a = block {
final core::Set<inf::C<dynamic>?> #t17 = new col::_CompactLinkedHashSet::•<inf::C<dynamic>?>();
#t17.{core::Set::add}{Invariant}(inf::field1);
#t17.{core::Set::add}{Invariant}(null);
} =>#t17;
core::Set<inf::C<dynamic>?> local2b = block {
final core::Set<inf::C<dynamic>?> #t18 = new col::_CompactLinkedHashSet::•<inf::C<dynamic>?>();
#t18.{core::Set::add}{Invariant}(inf::field2);
#t18.{core::Set::add}{Invariant}(null);
} =>#t18;
core::Set<inf::C<core::int>?> local2c = block {
final core::Set<inf::C<core::int>?> #t19 = new col::_CompactLinkedHashSet::•<inf::C<core::int>?>();
#t19.{core::Set::add}{Invariant}(inf::field3);
#t19.{core::Set::add}{Invariant}(null);
} =>#t19;
core::Set<inf::C<core::int>?> local2d = block {
final core::Set<inf::C<core::int>?> #t20 = new col::_CompactLinkedHashSet::•<inf::C<core::int>?>();
#t20.{core::Set::add}{Invariant}(inf::field4);
#t20.{core::Set::add}{Invariant}(null);
} =>#t20;
core::Set<inf::C<core::int?>?> local2e = block {
final core::Set<inf::C<core::int?>?> #t21 = new col::_CompactLinkedHashSet::•<inf::C<core::int?>?>();
#t21.{core::Set::add}{Invariant}(inf::field5);
#t21.{core::Set::add}{Invariant}(null);
} =>#t21;
core::Set<inf::C<core::int?>?> local2f = block {
final core::Set<inf::C<core::int?>?> #t22 = new col::_CompactLinkedHashSet::•<inf::C<core::int?>?>();
#t22.{core::Set::add}{Invariant}(inf::field6);
#t22.{core::Set::add}{Invariant}(null);
} =>#t22;
core::Set<core::int?> local2g = block {
final core::Set<core::int?> #t23 = new col::_CompactLinkedHashSet::•<core::int?>();
#t23.{core::Set::add}{Invariant}(inf::field7);
#t23.{core::Set::add}{Invariant}(null);
} =>#t23;
core::Set<core::int?> local2h = block {
final core::Set<core::int?> #t24 = new col::_CompactLinkedHashSet::•<core::int?>();
#t24.{core::Set::add}{Invariant}(inf::field8);
#t24.{core::Set::add}{Invariant}(null);
} =>#t24;
core::Set<inf::C<dynamic>?> local3a = block {
final core::Set<inf::C<dynamic>?> #t25 = new col::_CompactLinkedHashSet::•<inf::C<dynamic>?>();
#t25.{core::Set::add}{Invariant}(null);
#t25.{core::Set::add}{Invariant}(inf::field1);
} =>#t25;
core::Set<inf::C<dynamic>?> local3b = block {
final core::Set<inf::C<dynamic>?> #t26 = new col::_CompactLinkedHashSet::•<inf::C<dynamic>?>();
#t26.{core::Set::add}{Invariant}(null);
#t26.{core::Set::add}{Invariant}(inf::field2);
} =>#t26;
core::Set<inf::C<core::int>?> local3c = block {
final core::Set<inf::C<core::int>?> #t27 = new col::_CompactLinkedHashSet::•<inf::C<core::int>?>();
#t27.{core::Set::add}{Invariant}(null);
#t27.{core::Set::add}{Invariant}(inf::field3);
} =>#t27;
core::Set<inf::C<core::int>?> local3d = block {
final core::Set<inf::C<core::int>?> #t28 = new col::_CompactLinkedHashSet::•<inf::C<core::int>?>();
#t28.{core::Set::add}{Invariant}(null);
#t28.{core::Set::add}{Invariant}(inf::field4);
} =>#t28;
core::Set<inf::C<core::int?>?> local3e = block {
final core::Set<inf::C<core::int?>?> #t29 = new col::_CompactLinkedHashSet::•<inf::C<core::int?>?>();
#t29.{core::Set::add}{Invariant}(null);
#t29.{core::Set::add}{Invariant}(inf::field5);
} =>#t29;
core::Set<inf::C<core::int?>?> local3f = block {
final core::Set<inf::C<core::int?>?> #t30 = new col::_CompactLinkedHashSet::•<inf::C<core::int?>?>();
#t30.{core::Set::add}{Invariant}(null);
#t30.{core::Set::add}{Invariant}(inf::field6);
} =>#t30;
core::Set<core::int?> local3g = block {
final core::Set<core::int?> #t31 = new col::_CompactLinkedHashSet::•<core::int?>();
#t31.{core::Set::add}{Invariant}(null);
#t31.{core::Set::add}{Invariant}(inf::field7);
} =>#t31;
core::Set<core::int?> local3h = block {
final core::Set<core::int?> #t32 = new col::_CompactLinkedHashSet::•<core::int?>();
#t32.{core::Set::add}{Invariant}(null);
#t32.{core::Set::add}{Invariant}(inf::field8);
} =>#t32;
}