| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/nnbd/forin.dart:9:17: Warning: Assigning value of type 'Iterable<int>?' to a variable of type 'Iterable<dynamic>'. |
| // - 'Iterable' is from 'dart:core'. |
| // for (int x in i2) x; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/forin.dart:10:18: Warning: Assigning value of type 'Iterable<int>?' to a variable of type 'Iterable<dynamic>'. |
| // - 'Iterable' is from 'dart:core'. |
| // [for (int x in i2) x]; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/forin.dart:12:17: Warning: Assigning value of type 'List<int>?' to a variable of type 'Iterable<dynamic>'. |
| // - 'List' is from 'dart:core'. |
| // - 'Iterable' is from 'dart:core'. |
| // for (int x in l2) x; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/forin.dart:13:18: Warning: Assigning value of type 'List<int>?' to a variable of type 'Iterable<dynamic>'. |
| // - 'List' is from 'dart:core'. |
| // - 'Iterable' is from 'dart:core'. |
| // [for (int x in l2) x]; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/forin.dart:15:17: Warning: Assigning value of type 'Object' to a variable of type 'Iterable<dynamic>'. |
| // - 'Object' is from 'dart:core'. |
| // - 'Iterable' is from 'dart:core'. |
| // for (int x in o1) x; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/forin.dart:16:18: Warning: Assigning value of type 'Object' to a variable of type 'Iterable<dynamic>'. |
| // - 'Object' is from 'dart:core'. |
| // - 'Iterable' is from 'dart:core'. |
| // [for (int x in o1) x]; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/forin.dart:18:17: Warning: Assigning value of type 'Object?' to a variable of type 'Iterable<dynamic>'. |
| // - 'Object' is from 'dart:core'. |
| // - 'Iterable' is from 'dart:core'. |
| // for (int x in o2) x; |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/forin.dart:19:18: Warning: Assigning value of type 'Object?' to a variable of type 'Iterable<dynamic>'. |
| // - 'Object' is from 'dart:core'. |
| // - 'Iterable' is from 'dart:core'. |
| // [for (int x in o2) x]; |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| import "dart:_internal" as _in; |
| |
| static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, core::Object o1, core::Object? o2) → dynamic { |
| { |
| core::Iterator<core::int>* :sync-for-iterator = _in::unsafeCast<core::Iterable<core::int>*>(i2).{core::Iterable::iterator}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) { |
| core::int x = :sync-for-iterator.{core::Iterator::current}; |
| x; |
| } |
| } |
| block { |
| final core::List<core::int> #t1 = <core::int>[]; |
| { |
| core::Iterator<core::int>* :sync-for-iterator = _in::unsafeCast<core::Iterable<core::int>*>(i2).{core::Iterable::iterator}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) { |
| core::int x = :sync-for-iterator.{core::Iterator::current}; |
| #t1.{core::List::add}(x); |
| } |
| } |
| } =>#t1; |
| { |
| core::Iterator<core::int*>* :sync-for-iterator = _in::unsafeCast<core::Iterable<core::int*>*>(l2).{core::Iterable::iterator}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) { |
| core::int x = :sync-for-iterator.{core::Iterator::current}; |
| x; |
| } |
| } |
| block { |
| final core::List<core::int> #t2 = <core::int>[]; |
| { |
| core::Iterator<core::int*>* :sync-for-iterator = _in::unsafeCast<core::Iterable<core::int*>*>(l2).{core::Iterable::iterator}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) { |
| core::int x = :sync-for-iterator.{core::Iterator::current}; |
| #t2.{core::List::add}(x); |
| } |
| } |
| } =>#t2; |
| { |
| core::Iterator<dynamic>* :sync-for-iterator = _in::unsafeCast<core::Iterable<dynamic>*>(o1 as{TypeError,ForNonNullableByDefault} core::Iterable<dynamic>).{core::Iterable::iterator}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) { |
| final dynamic #t3 = :sync-for-iterator.{core::Iterator::current}; |
| { |
| core::int x = #t3 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int; |
| x; |
| } |
| } |
| } |
| block { |
| final core::List<core::int> #t4 = <core::int>[]; |
| { |
| core::Iterator<dynamic>* :sync-for-iterator = _in::unsafeCast<core::Iterable<dynamic>*>(o1 as{TypeError,ForNonNullableByDefault} core::Iterable<dynamic>).{core::Iterable::iterator}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) { |
| final dynamic #t5 = :sync-for-iterator.{core::Iterator::current}; |
| { |
| core::int x = #t5 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int; |
| #t4.{core::List::add}(x); |
| } |
| } |
| } |
| } =>#t4; |
| { |
| core::Iterator<dynamic>* :sync-for-iterator = _in::unsafeCast<core::Iterable<dynamic>*>(o2 as{TypeError,ForNonNullableByDefault} core::Iterable<dynamic>).{core::Iterable::iterator}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) { |
| final dynamic #t6 = :sync-for-iterator.{core::Iterator::current}; |
| { |
| core::int x = #t6 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int; |
| x; |
| } |
| } |
| } |
| block { |
| final core::List<core::int> #t7 = <core::int>[]; |
| { |
| core::Iterator<dynamic>* :sync-for-iterator = _in::unsafeCast<core::Iterable<dynamic>*>(o2 as{TypeError,ForNonNullableByDefault} core::Iterable<dynamic>).{core::Iterable::iterator}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) { |
| final dynamic #t8 = :sync-for-iterator.{core::Iterator::current}; |
| { |
| core::int x = #t8 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int; |
| #t7.{core::List::add}(x); |
| } |
| } |
| } |
| } =>#t7; |
| } |
| static method ok(core::Iterable<core::int> i1, core::List<core::int> l1, dynamic d) → dynamic { |
| { |
| core::Iterator<core::int>* :sync-for-iterator = _in::unsafeCast<core::Iterable<core::int>*>(i1).{core::Iterable::iterator}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) { |
| core::int x = :sync-for-iterator.{core::Iterator::current}; |
| x; |
| } |
| } |
| block { |
| final core::List<core::int> #t9 = <core::int>[]; |
| { |
| core::Iterator<core::int>* :sync-for-iterator = _in::unsafeCast<core::Iterable<core::int>*>(i1).{core::Iterable::iterator}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) { |
| core::int x = :sync-for-iterator.{core::Iterator::current}; |
| #t9.{core::List::add}(x); |
| } |
| } |
| } =>#t9; |
| { |
| core::Iterator<core::int*>* :sync-for-iterator = _in::unsafeCast<core::Iterable<core::int*>*>(l1).{core::Iterable::iterator}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) { |
| core::int x = :sync-for-iterator.{core::Iterator::current}; |
| x; |
| } |
| } |
| block { |
| final core::List<core::int> #t10 = <core::int>[]; |
| { |
| core::Iterator<core::int*>* :sync-for-iterator = _in::unsafeCast<core::Iterable<core::int*>*>(l1).{core::Iterable::iterator}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) { |
| core::int x = :sync-for-iterator.{core::Iterator::current}; |
| #t10.{core::List::add}(x); |
| } |
| } |
| } =>#t10; |
| { |
| core::Iterator<dynamic>* :sync-for-iterator = _in::unsafeCast<core::Iterable<dynamic>*>(d as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>).{core::Iterable::iterator}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) { |
| final dynamic #t11 = :sync-for-iterator.{core::Iterator::current}; |
| { |
| core::int x = #t11 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int; |
| x; |
| } |
| } |
| } |
| block { |
| final core::List<core::int> #t12 = <core::int>[]; |
| { |
| core::Iterator<dynamic>* :sync-for-iterator = _in::unsafeCast<core::Iterable<dynamic>*>(d as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>).{core::Iterable::iterator}; |
| for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) { |
| final dynamic #t13 = :sync-for-iterator.{core::Iterator::current}; |
| { |
| core::int x = #t13 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int; |
| #t12.{core::List::add}(x); |
| } |
| } |
| } |
| } =>#t12; |
| } |
| static method main() → dynamic {} |