Closed
Description
Consider the following code:
import 'dart:async';
void main() async {
final value = await fn();
print(value);
}
FutureOr<Object> fn() async {
return Future<Object>.value(42);
}
This should print 42
but actually prints Instance of '_Future<dynamic>'
Returning anything other than FutureOr<Object>
in fn
fixes the issue. This includes changing Object
to int
.