提交 0e74121d 编写于 作者: M Marijn Haverbeke

Error when parsing the empty record type

Issue #1200
上级 9a269a3a
......@@ -517,6 +517,7 @@ fn parse_ty(p: parser, colons_before_params: bool) -> @ast::ty {
let elems =
parse_seq(token::LBRACE, token::RBRACE, seq_sep_opt(token::COMMA),
parse_ty_field, p);
if vec::len(elems.node) == 0u { unexpected(p, token::RBRACE); }
let hi = elems.span.hi;
t = ast::ty_rec(elems.node);
if p.peek() == token::COLON {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册