| 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 { |
| for (final invalid-type #t1 in 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>) { |
| 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 dynamic #t2 = #0#6#isSet = true in #0#6 = #0#0.{core::List::[]}(0){(core::int) → invalid-type}) is core::int && (let final dynamic #t3 = x = #0#6#isSet ?{invalid-type} #0#6{invalid-type} : let final dynamic #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 |
| } |