You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
abstract class Executor<I,O> {
O execute(I input);
}
void main() {
final exe = SomeExecutor<void, int>();
final result = someExecutor.execute(null);
}
It is much clearer that the task above does not take an input, instead of a nullable input when doing someExecutor.execute(); So it'd be nice to have it optional for the times where you call execute explicitely and statically know the type.
The text was updated successfully, but these errors were encountered:
The idea is that a void-typed parameter is implicitly optional (if named or trailing positional, I assume).
This is close to #2232 (nullable means optional) in that it makes the optionality of an argument at the call-point depend on the type of the argument. That feature request makes any nullable type optional, which would include void.
Originally in sdk repository dart-lang/sdk#34176
It is much clearer that the task above does not take an input, instead of a nullable input when doing
someExecutor.execute();
So it'd be nice to have it optional for the times where you call execute explicitely and statically know the type.The text was updated successfully, but these errors were encountered: