Fix empty parenthesized type unexpected error (#1323)
This commit is contained in:
1 parent
bc5d675b6e
commit
ba281e8475
4 files changed
+11
No files matched your search
@@ -1393,6 +1393,9 @@ public class Parser {
|
||||
children.add(ret);
|
||||
typ = new Type.FunctionType(children, tk.span.endWith(ret.span()));
|
||||
} else {
|
||||
if (children.isEmpty()) {
|
||||
throw new ParserError(ErrorMessages.create("unexpectedTokenForType", ")"), end);
|
||||
}
|
||||
typ = new ParenthesizedType((Type) children.get(0), tk.span.endWith(end));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user