blob: 92a2f2a5d56239f275329c42bd5102b5d61a8ab9 [file] [log] [blame]
library;
import self as self;
import "dart:core" as core;
static method useAddAll() void {
dynamic dynamicList1 = core::_GrowableList::_literal3<core::int*>(0, 1, 2);
dynamic dynamicList2 = core::_GrowableList::_literal3<core::num*>(3, 4, 5);
core::Iterable<core::int*>* iterableIntList = core::_GrowableList::_literal3<core::int*>(6, 7, 8);
core::Iterable<core::num*>* iterableNumList1 = core::_GrowableList::_literal3<core::int*>(9, 10, 11);
core::Iterable<core::num*>* iterableNumList2 = core::_GrowableList::_literal3<core::num*>(12, 13, 14);
core::List<core::int*>* intList = core::_GrowableList::_literal3<core::int*>(15, 16, 17);
core::List<core::num*>* numList1 = core::_GrowableList::_literal3<core::int*>(18, 19, 20);
core::List<core::num*>* numList2 = core::_GrowableList::_literal3<core::num*>(21, 22, 23);
core::List<core::int*>* list1 = block {
final core::List<core::int*>* #t1 = core::_GrowableList::•<core::int*>(0);
{
core::Iterator<dynamic>* :sync-for-iterator = (dynamicList1 as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator}{core::Iterator<dynamic>*};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final dynamic #t2 = :sync-for-iterator.{core::Iterator::current}{dynamic};
{
final core::int* #t3 = #t2 as{TypeError} core::int*;
#t1.{core::List::add}{Invariant}(#t3){(core::int*) →* void};
}
}
}
{
core::Iterator<dynamic>* :sync-for-iterator = (dynamicList2 as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator}{core::Iterator<dynamic>*};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final dynamic #t4 = :sync-for-iterator.{core::Iterator::current}{dynamic};
{
final core::int* #t5 = #t4 as{TypeError} core::int*;
#t1.{core::List::add}{Invariant}(#t5){(core::int*) →* void};
}
}
}
#t1.{core::List::addAll}{Invariant}(iterableIntList){(core::Iterable<core::int*>*) →* void};
{
core::Iterator<core::num*>* :sync-for-iterator = iterableNumList1.{core::Iterable::iterator}{core::Iterator<core::num*>*};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final dynamic #t6 = :sync-for-iterator.{core::Iterator::current}{core::num*};
{
final core::int* #t7 = #t6 as{TypeError} core::int*;
#t1.{core::List::add}{Invariant}(#t7){(core::int*) →* void};
}
}
}
{
core::Iterator<core::num*>* :sync-for-iterator = iterableNumList2.{core::Iterable::iterator}{core::Iterator<core::num*>*};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final dynamic #t8 = :sync-for-iterator.{core::Iterator::current}{core::num*};
{
final core::int* #t9 = #t8 as{TypeError} core::int*;
#t1.{core::List::add}{Invariant}(#t9){(core::int*) →* void};
}
}
}
#t1.{core::List::addAll}{Invariant}(intList){(core::Iterable<core::int*>*) →* void};
{
core::Iterator<core::num*>* :sync-for-iterator = numList1.{core::Iterable::iterator}{core::Iterator<core::num*>*};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final dynamic #t10 = :sync-for-iterator.{core::Iterator::current}{core::num*};
{
final core::int* #t11 = #t10 as{TypeError} core::int*;
#t1.{core::List::add}{Invariant}(#t11){(core::int*) →* void};
}
}
}
{
core::Iterator<core::num*>* :sync-for-iterator = numList2.{core::Iterable::iterator}{core::Iterator<core::num*>*};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final dynamic #t12 = :sync-for-iterator.{core::Iterator::current}{core::num*};
{
final core::int* #t13 = #t12 as{TypeError} core::int*;
#t1.{core::List::add}{Invariant}(#t13){(core::int*) →* void};
}
}
}
} =>#t1;
self::expect(core::_GrowableList::generate<core::int*>(24, (core::int* i) core::int* => i), list1);
core::List<core::num*>* list2 = block {
final core::List<core::num*>* #t14 = core::_GrowableList::•<core::num*>(0);
{
core::Iterator<dynamic>* :sync-for-iterator = (dynamicList1 as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator}{core::Iterator<dynamic>*};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final dynamic #t15 = :sync-for-iterator.{core::Iterator::current}{dynamic};
{
final core::num* #t16 = #t15 as{TypeError} core::num*;
#t14.{core::List::add}{Invariant}(#t16){(core::num*) →* void};
}
}
}
{
core::Iterator<dynamic>* :sync-for-iterator = (dynamicList2 as{TypeError,ForDynamic} core::Iterable<dynamic>*).{core::Iterable::iterator}{core::Iterator<dynamic>*};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final dynamic #t17 = :sync-for-iterator.{core::Iterator::current}{dynamic};
{
final core::num* #t18 = #t17 as{TypeError} core::num*;
#t14.{core::List::add}{Invariant}(#t18){(core::num*) →* void};
}
}
}
#t14.{core::List::addAll}{Invariant}(iterableIntList){(core::Iterable<core::num*>*) →* void};
#t14.{core::List::addAll}{Invariant}(iterableNumList1){(core::Iterable<core::num*>*) →* void};
#t14.{core::List::addAll}{Invariant}(iterableNumList2){(core::Iterable<core::num*>*) →* void};
#t14.{core::List::addAll}{Invariant}(intList){(core::Iterable<core::num*>*) →* void};
#t14.{core::List::addAll}{Invariant}(numList1){(core::Iterable<core::num*>*) →* void};
#t14.{core::List::addAll}{Invariant}(numList2){(core::Iterable<core::num*>*) →* void};
} =>#t14;
self::expect(core::_GrowableList::generate<core::num*>(24, (core::int* i) core::int* => i), list2);
core::List<core::int*>* list3 = block {
final core::List<core::int*>* #t19 = core::_GrowableList::•<core::int*>(0);
final core::Iterable<dynamic>* #t20 = dynamicList1 as{TypeError,ForDynamic} core::Iterable<dynamic>*;
if(!(#t20 == null)) {
core::Iterator<dynamic>* :sync-for-iterator = #t20.{core::Iterable::iterator}{core::Iterator<dynamic>*};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final dynamic #t21 = :sync-for-iterator.{core::Iterator::current}{dynamic};
{
final core::int* #t22 = #t21 as{TypeError} core::int*;
#t19.{core::List::add}{Invariant}(#t22){(core::int*) →* void};
}
}
}
final core::Iterable<dynamic>* #t23 = dynamicList2 as{TypeError,ForDynamic} core::Iterable<dynamic>*;
if(!(#t23 == null)) {
core::Iterator<dynamic>* :sync-for-iterator = #t23.{core::Iterable::iterator}{core::Iterator<dynamic>*};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final dynamic #t24 = :sync-for-iterator.{core::Iterator::current}{dynamic};
{
final core::int* #t25 = #t24 as{TypeError} core::int*;
#t19.{core::List::add}{Invariant}(#t25){(core::int*) →* void};
}
}
}
final core::Iterable<core::int*>* #t26 = iterableIntList;
if(!(#t26 == null))
#t19.{core::List::addAll}{Invariant}(#t26){(core::Iterable<core::int*>*) →* void};
final core::Iterable<dynamic>* #t27 = iterableNumList1;
if(!(#t27 == null)) {
core::Iterator<dynamic>* :sync-for-iterator = #t27.{core::Iterable::iterator}{core::Iterator<dynamic>*};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final dynamic #t28 = :sync-for-iterator.{core::Iterator::current}{dynamic};
{
final core::int* #t29 = #t28 as{TypeError} core::int*;
#t19.{core::List::add}{Invariant}(#t29){(core::int*) →* void};
}
}
}
final core::Iterable<dynamic>* #t30 = iterableNumList2;
if(!(#t30 == null)) {
core::Iterator<dynamic>* :sync-for-iterator = #t30.{core::Iterable::iterator}{core::Iterator<dynamic>*};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final dynamic #t31 = :sync-for-iterator.{core::Iterator::current}{dynamic};
{
final core::int* #t32 = #t31 as{TypeError} core::int*;
#t19.{core::List::add}{Invariant}(#t32){(core::int*) →* void};
}
}
}
final core::Iterable<core::int*>* #t33 = intList;
if(!(#t33 == null))
#t19.{core::List::addAll}{Invariant}(#t33){(core::Iterable<core::int*>*) →* void};
final core::Iterable<dynamic>* #t34 = numList1;
if(!(#t34 == null)) {
core::Iterator<dynamic>* :sync-for-iterator = #t34.{core::Iterable::iterator}{core::Iterator<dynamic>*};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final dynamic #t35 = :sync-for-iterator.{core::Iterator::current}{dynamic};
{
final core::int* #t36 = #t35 as{TypeError} core::int*;
#t19.{core::List::add}{Invariant}(#t36){(core::int*) →* void};
}
}
}
final core::Iterable<dynamic>* #t37 = numList2;
if(!(#t37 == null)) {
core::Iterator<dynamic>* :sync-for-iterator = #t37.{core::Iterable::iterator}{core::Iterator<dynamic>*};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final dynamic #t38 = :sync-for-iterator.{core::Iterator::current}{dynamic};
{
final core::int* #t39 = #t38 as{TypeError} core::int*;
#t19.{core::List::add}{Invariant}(#t39){(core::int*) →* void};
}
}
}
} =>#t19;
self::expect(core::_GrowableList::generate<core::int*>(24, (core::int* i) core::int* => i), list3);
core::List<core::num*>* list4 = block {
final core::List<core::num*>* #t40 = core::_GrowableList::•<core::num*>(0);
final core::Iterable<dynamic>* #t41 = dynamicList1 as{TypeError,ForDynamic} core::Iterable<dynamic>*;
if(!(#t41 == null)) {
core::Iterator<dynamic>* :sync-for-iterator = #t41.{core::Iterable::iterator}{core::Iterator<dynamic>*};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final dynamic #t42 = :sync-for-iterator.{core::Iterator::current}{dynamic};
{
final core::num* #t43 = #t42 as{TypeError} core::num*;
#t40.{core::List::add}{Invariant}(#t43){(core::num*) →* void};
}
}
}
final core::Iterable<dynamic>* #t44 = dynamicList2 as{TypeError,ForDynamic} core::Iterable<dynamic>*;
if(!(#t44 == null)) {
core::Iterator<dynamic>* :sync-for-iterator = #t44.{core::Iterable::iterator}{core::Iterator<dynamic>*};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final dynamic #t45 = :sync-for-iterator.{core::Iterator::current}{dynamic};
{
final core::num* #t46 = #t45 as{TypeError} core::num*;
#t40.{core::List::add}{Invariant}(#t46){(core::num*) →* void};
}
}
}
final core::Iterable<core::num*>* #t47 = iterableIntList;
if(!(#t47 == null))
#t40.{core::List::addAll}{Invariant}(#t47){(core::Iterable<core::num*>*) →* void};
final core::Iterable<core::num*>* #t48 = iterableNumList1;
if(!(#t48 == null))
#t40.{core::List::addAll}{Invariant}(#t48){(core::Iterable<core::num*>*) →* void};
final core::Iterable<core::num*>* #t49 = iterableNumList2;
if(!(#t49 == null))
#t40.{core::List::addAll}{Invariant}(#t49){(core::Iterable<core::num*>*) →* void};
final core::Iterable<core::num*>* #t50 = intList;
if(!(#t50 == null))
#t40.{core::List::addAll}{Invariant}(#t50){(core::Iterable<core::num*>*) →* void};
final core::Iterable<core::num*>* #t51 = numList1;
if(!(#t51 == null))
#t40.{core::List::addAll}{Invariant}(#t51){(core::Iterable<core::num*>*) →* void};
final core::Iterable<core::num*>* #t52 = numList2;
if(!(#t52 == null))
#t40.{core::List::addAll}{Invariant}(#t52){(core::Iterable<core::num*>*) →* void};
} =>#t40;
self::expect(core::_GrowableList::generate<core::num*>(24, (core::int* i) core::int* => i), list4);
}
static method main() dynamic {
self::useAddAll();
}
static method expect(core::List<dynamic>* list1, core::List<dynamic>* list2) void {
if(!(list1.{core::List::length}{core::int*} =={core::num::==}{(core::Object*) →* core::bool*} list2.{core::List::length}{core::int*})) {
throw "Unexpected length. Expected ${list1.{core::List::length}{core::int*}}, actual ${list2.{core::List::length}{core::int*}}.";
}
for (core::int* i = 0; i.{core::num::<}(list1.{core::List::length}{core::int*}){(core::num*) →* core::bool*}; i = i.{core::num::+}(1){(core::num*) →* core::int*}) {
if(!(list1.{core::List::[]}(i){(core::int*) →* dynamic} =={core::Object::==}{(core::Object*) →* core::bool*} list2.{core::List::[]}(i){(core::int*) →* dynamic})) {
throw "Unexpected element at index ${i}. Expected ${list1.{core::List::[]}(i){(core::int*) →* dynamic}}, actual ${list2.{core::List::[]}(i){(core::int*) →* dynamic}}.";
}
}
}