blob: a360eaae23241de2592b95118128400bc5b6c0a6 [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/patterns/for_in_inference_error.dart:6:23: Error: The type 'int' used in the 'for' loop must implement 'Iterable<dynamic>'.
// - 'Iterable' is from 'dart:core'.
// for (var [int x] in 0) {} // Error.
// ^
//
import self as self;
import "dart:core" as core;
static method test() dynamic {
{
synthesized core::Iterator<Never> :sync-for-iterator = invalid-expression "pkg/front_end/testcases/patterns/for_in_inference_error.dart:6:23: Error: The type 'int' used in the 'for' loop must implement 'Iterable<dynamic>'.
- 'Iterable' is from 'dart:core'.
for (var [int x] in 0) {} // Error.
^" in 0 as{TypeError} core::Iterable<dynamic>.{core::Iterable::iterator}{core::Iterator<Never>};
for (; :sync-for-iterator.{core::Iterator::moveNext}(){() core::bool}; ) {
final invalid-type #t1 = :sync-for-iterator.{core::Iterator::current}{Never};
{
hoisted core::int x;
{
final synthesized invalid-type #0#0 = #t1;
synthesized invalid-type #0#6;
synthesized core::bool #0#6#isSet = false;
if(!(#0#0 is core::List<invalid-type> && #0#0.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && ((#0#6#isSet ?{invalid-type} #0#6{invalid-type} : let final core::bool #t2 = #0#6#isSet = true in #0#6 = #0#0.{core::List::[]}(0){(core::int) → invalid-type}) is core::int && (let final invalid-type #t3 = x = #0#6#isSet ?{invalid-type} #0#6{invalid-type} : let final core::bool #t4 = #0#6#isSet = true in #0#6 = #0#0.{core::List::[]}(0){(core::int) → invalid-type} in true))))
throw{for-error-handling} new core::StateError::•("Pattern matching error");
}
}
}
}
}
constants {
#C1 = 1
}