blob: 346bcb4b3b7117030241a8433c083d239e3c48f2 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/nnbd/forin.dart:9:17: Error: The type 'Iterable<int>?' used in the 'for' loop must implement 'Iterable<dynamic>' because 'Iterable<int>?' is nullable and 'Iterable<dynamic>' isn't.
// - 'Iterable' is from 'dart:core'.
// for (int x in i2) x;
// ^
//
// pkg/front_end/testcases/nnbd/forin.dart:10:18: Error: The type 'Iterable<int>?' used in the 'for' loop must implement 'Iterable<dynamic>' because 'Iterable<int>?' is nullable and 'Iterable<dynamic>' isn't.
// - 'Iterable' is from 'dart:core'.
// [for (int x in i2) x];
// ^
//
// pkg/front_end/testcases/nnbd/forin.dart:12:17: Error: The type 'List<int>?' used in the 'for' loop must implement 'Iterable<dynamic>' because 'List<int>?' is nullable and 'Iterable<dynamic>' isn't.
// - '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: Error: The type 'List<int>?' used in the 'for' loop must implement 'Iterable<dynamic>' because 'List<int>?' is nullable and 'Iterable<dynamic>' isn't.
// - '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: Error: The type 'Object' used in the 'for' loop must implement '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: Error: The type 'Object' used in the 'for' loop must implement '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: Error: The type 'Object?' used in the 'for' loop must implement '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: Error: The type 'Object?' used in the 'for' loop must implement '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;
static method error(core::Iterable<core::int>? i2, core::List<core::int>? l2, core::Object o1, core::Object? o2) → dynamic {
{
core::Iterator<dynamic> :sync-for-iterator = (let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:9:17: Error: The type 'Iterable<int>?' used in the 'for' loop must implement 'Iterable<dynamic>' because 'Iterable<int>?' is nullable and 'Iterable<dynamic>' isn't.
- 'Iterable' is from 'dart:core'.
for (int x in i2) x;
^" in 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> #t2 = core::_GrowableList::•<core::int>(0);
{
core::Iterator<dynamic> :sync-for-iterator = (let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:10:18: Error: The type 'Iterable<int>?' used in the 'for' loop must implement 'Iterable<dynamic>' because 'Iterable<int>?' is nullable and 'Iterable<dynamic>' isn't.
- 'Iterable' is from 'dart:core'.
[for (int x in i2) x];
^" in i2).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int x = :sync-for-iterator.{core::Iterator::current};
#t2.{core::List::add}{Invariant}(x);
}
}
} =>#t2;
{
core::Iterator<dynamic> :sync-for-iterator = (let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:12:17: Error: The type 'List<int>?' used in the 'for' loop must implement 'Iterable<dynamic>' because 'List<int>?' is nullable and 'Iterable<dynamic>' isn't.
- 'List' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
for (int x in l2) x;
^" in 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> #t5 = core::_GrowableList::•<core::int>(0);
{
core::Iterator<dynamic> :sync-for-iterator = (let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:13:18: Error: The type 'List<int>?' used in the 'for' loop must implement 'Iterable<dynamic>' because 'List<int>?' is nullable and 'Iterable<dynamic>' isn't.
- 'List' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
[for (int x in l2) x];
^" in l2).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int x = :sync-for-iterator.{core::Iterator::current};
#t5.{core::List::add}{Invariant}(x);
}
}
} =>#t5;
{
core::Iterator<dynamic> :sync-for-iterator = (let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:15:17: Error: The type 'Object' used in the 'for' loop must implement 'Iterable<dynamic>'.
- 'Object' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
for (int x in o1) x;
^" in o1 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;
x;
}
}
}
block {
final core::List<core::int> #t9 = core::_GrowableList::•<core::int>(0);
{
core::Iterator<dynamic> :sync-for-iterator = (let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:16:18: Error: The type 'Object' used in the 'for' loop must implement 'Iterable<dynamic>'.
- 'Object' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
[for (int x in o1) x];
^" in o1 as{TypeError,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;
#t9.{core::List::add}{Invariant}(x);
}
}
}
} =>#t9;
{
core::Iterator<dynamic> :sync-for-iterator = (let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:18:17: Error: The type 'Object?' used in the 'for' loop must implement 'Iterable<dynamic>'.
- 'Object' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
for (int x in o2) x;
^" in o2 as{TypeError,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;
x;
}
}
}
block {
final core::List<core::int> #t14 = core::_GrowableList::•<core::int>(0);
{
core::Iterator<dynamic> :sync-for-iterator = (let final<BottomType> #t15 = invalid-expression "pkg/front_end/testcases/nnbd/forin.dart:19:18: Error: The type 'Object?' used in the 'for' loop must implement 'Iterable<dynamic>'.
- 'Object' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
[for (int x in o2) x];
^" in o2 as{TypeError,ForNonNullableByDefault} core::Iterable<dynamic>).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t16 = :sync-for-iterator.{core::Iterator::current};
{
core::int x = #t16 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
#t14.{core::List::add}{Invariant}(x);
}
}
}
} =>#t14;
}
static method ok(core::Iterable<core::int> i1, core::List<core::int> l1, dynamic d) → dynamic {
{
core::Iterator<core::int> :sync-for-iterator = 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> #t17 = core::_GrowableList::•<core::int>(0);
{
core::Iterator<core::int> :sync-for-iterator = i1.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int x = :sync-for-iterator.{core::Iterator::current};
#t17.{core::List::add}{Invariant}(x);
}
}
} =>#t17;
{
core::Iterator<core::int> :sync-for-iterator = 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> #t18 = core::_GrowableList::•<core::int>(0);
{
core::Iterator<core::int> :sync-for-iterator = l1.{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
core::int x = :sync-for-iterator.{core::Iterator::current};
#t18.{core::List::add}{Invariant}(x);
}
}
} =>#t18;
{
core::Iterator<dynamic> :sync-for-iterator = (d as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t19 = :sync-for-iterator.{core::Iterator::current};
{
core::int x = #t19 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
x;
}
}
}
block {
final core::List<core::int> #t20 = core::_GrowableList::•<core::int>(0);
{
core::Iterator<dynamic> :sync-for-iterator = (d as{TypeError,ForDynamic,ForNonNullableByDefault} core::Iterable<dynamic>).{core::Iterable::iterator};
for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
final dynamic #t21 = :sync-for-iterator.{core::Iterator::current};
{
core::int x = #t21 as{TypeError,ForDynamic,ForNonNullableByDefault} core::int;
#t20.{core::List::add}{Invariant}(x);
}
}
}
} =>#t20;
}
static method main() → dynamic {}