Closed
Description
Error message:
tests/language_2/await_test.dart:141:47: Error: The method '<' isn't defined for the class 'dart.async::FutureOr<dart.core::int>'.
Try correcting the name to the name of an existing method, or defining a method named '<'.
for (var i = await(func(0)); await func(i < 5); await func(i++)) {
^
tests/language_2/await_test.dart:141:65: Error: The method '+' isn't defined for the class 'dart.async::FutureOr<dart.core::int>'.
Try correcting the name to the name of an existing method, or defining a method named '+'.
for (var i = await(func(0)); await func(i < 5); await func(i++)) {
^
where func
has type FutureOr<T> Function<T>(T)
.
This means that the static type of await(func(0))
use to infer the type of i
is FutureOr<int>
, not int
as it should be.
(See language_2/await_test when it lands).