|
Implemented support for generalized void in analyzer.
Changed the analyzer parser to accept usages of `void` which were
previously rejected as syntax errors: `void` can now be the type
annotation for a variable or parameter, and it can be an actual type
argument.
Removed affected error codes like VOID_PARAMETER, VOID_VARIABLE,
VOID_RETURN_FOR_GETTER and associated declarations (like checking
functions), and adjusted test cases to expect success rather than
compile time errors.
Adjusted generalized_void_syntax_test.dart (it had real errors like
`final` variables with no initializer etc. that were not detected
when tools would just reject the file as syntactically wrong).
R=brianwilkerson@google.com
Committed: https://github.com/dart-lang/sdk/commit/1d44f5296a711c5f60c99a525db1458014c3fe41
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+138 lines, -173 lines) |
Patch |
|
M |
pkg/analyzer/lib/error/error.dart
|
View
|
|
2 chunks |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
|
View
|
|
1 chunk |
+0 lines, -12 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/src/error/codes.dart
|
View
|
1
|
1 chunk |
+0 lines, -10 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/src/generated/error_verifier.dart
|
View
|
|
2 chunks |
+0 lines, -14 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/lib/src/generated/parser.dart
|
View
|
|
29 chunks |
+81 lines, -94 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/test/generated/parser_test.dart
|
View
|
|
5 chunks |
+21 lines, -15 lines |
0 comments
|
Download
|
|
M |
pkg/analyzer/test/generated/static_warning_code_test.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
tests/co19/co19-analyzer2.status
|
View
|
1
|
2 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
tests/language/generalized_void_syntax_test.dart
|
View
|
|
3 chunks |
+17 lines, -14 lines |
0 comments
|
Download
|
|
M |
tests/language/language.status
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
tests/language/language_analyzer2.status
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
tests/language/language_dart2js.status
|
View
|
1
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
tests/language/syntax_test.dart
|
View
|
|
2 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
Total messages: 5 (2 generated)
|