Please review new void used as type message #12969
Labels
P2
A bug or feature request we're likely to work on
type-documentation
A request to add or improve documentation
web-dart2js
I have looked at these error messages:
foo.dart:1:1: expected identifier, but got 'void'
void x;
^^^^
foo.dart:1:5: Error: Type "void" is only allowed in a return type.
foo(void x) {}
^^^^
It is changed to:
foo.dart:1:1: Error: Type 'void' can't be used here because it isn't a return type.
Try removing 'void' keyword or replace it with 'var', 'final', or a type.
void x;
^^^^
foo.dart:1:5: Error: Type 'void' can't be used here because it isn't a return type.
Try removing 'void' keyword or replace it with 'var', 'final', or a type.
foo(void x) {}
^^^^
Let me know what you think.
The text was updated successfully, but these errors were encountered: