blob: 475b64a25b0328a892d2146f90efe8143394a62f [file] [log] [blame]
library test;
import self as self;
import "dart:async" as asy;
import "dart:core" as core;
static method test() dynamic /* originally async */ {
final asy::Completer<dynamic> :async_completer = asy::Completer::sync<dynamic>();
asy::FutureOr<dynamic> :return_value;
dynamic :async_stack_trace;
dynamic :async_op_then;
dynamic :async_op_error;
dynamic :await_jump_var = 0;
dynamic :await_ctx_var;
dynamic :saved_try_context_var0;
dynamic :saved_try_context_var1;
dynamic :exception0;
dynamic :stack_trace0;
function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) dynamic yielding
try {
#L1:
{
core::String s;
for (final dynamic #t1 in let<BottomType> _ = null in let final dynamic #t2 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:46: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::Iterable<dynamic>'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::Iterable<dynamic>'.
for (int x in /*@error=InvalidAssignment*/ s) {}
^" in let final core::String #t3 = s in null) {
core::int x = #t1 as{TypeError} core::int;
}
{
asy::_StreamIterator<dynamic> :for-iterator = new asy::_StreamIterator::•<dynamic>(let<BottomType> _ = null in let final dynamic #t4 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:52: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.async::Stream<dynamic>'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.async::Stream<dynamic>'.
await for (int x in /*@error=InvalidAssignment*/ s) {}
^" in let final core::String #t5 = s in null);
try
#L2:
while (true) {
[yield] let dynamic #t6 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
if(:result) {
final dynamic #t7 = :for-iterator.{asy::_StreamIterator::current};
{
core::int x = #t7 as{TypeError} core::int;
}
}
else
break #L2;
}
finally
if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) {
[yield] let dynamic #t8 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null;
:result;
}
}
core::int y;
for (final dynamic #t9 in let<BottomType> _ = null in let final dynamic #t10 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:42: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::Iterable<dynamic>'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::Iterable<dynamic>'.
for (y in /*@error=InvalidAssignment*/ s) {}
^" in let final core::String #t11 = s in null) {
y = #t9 as{TypeError} core::int;
}
{
asy::_StreamIterator<dynamic> :for-iterator = new asy::_StreamIterator::•<dynamic>(let<BottomType> _ = null in let final dynamic #t12 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:48: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.async::Stream<dynamic>'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.async::Stream<dynamic>'.
await for (y in /*@error=InvalidAssignment*/ s) {}
^" in let final core::String #t13 = s in null);
try
#L3:
while (true) {
[yield] let dynamic #t14 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
if(:result) {
final dynamic #t15 = :for-iterator.{asy::_StreamIterator::current};
{
y = #t15 as{TypeError} core::int;
}
}
else
break #L3;
}
finally
if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) {
[yield] let dynamic #t16 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null;
:result;
}
}
}
asy::_completeOnAsyncReturn(:async_completer, :return_value);
return;
}
on dynamic catch(dynamic :exception, dynamic :stack_trace) {
:async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
}
:async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
:async_op_then = asy::_asyncThenWrapperHelper(:async_op);
:async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
asy::Future::microtask<dynamic>(:async_op);
return :async_completer.{asy::Completer::future};
}
static method main() → dynamic {}