| Index: pkg/analyzer/lib/src/generated/parser.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
|
| index 16d1ff2ff95de5f4111d0f602b0dee593e2d9a70..45a62e3a85f1480e523d5a5d20eb4de97379358d 100644
|
| --- a/pkg/analyzer/lib/src/generated/parser.dart
|
| +++ b/pkg/analyzer/lib/src/generated/parser.dart
|
| @@ -1709,6 +1709,13 @@ class IncrementalParseDispatcher implements AstVisitor<AstNode> {
|
| throw new InsufficientContextException();
|
| } else if (node.metadata.contains(_oldNode)) {
|
| return _parser.parseAnnotation();
|
| + } else if (identical(_oldNode, node.type)) {
|
| + // There is not enough context to know whether we should reparse the type
|
| + // using parseReturnType() (which allows 'void') or parseTypeName()
|
| + // (which doesn't). Note that even though the language disallows
|
| + // variables of type 'void', the parser sometimes accepts them in the
|
| + // course of error recovery (e.g. "class C { void v; }"
|
| + throw new InsufficientContextException();
|
| } else if (node.variables.contains(_oldNode)) {
|
| throw new InsufficientContextException();
|
| }
|
|
|