grammar: fix where clause parsing

closes #205
This commit is contained in:
Aleksey Kladov
2018-11-06 21:19:32 +03:00
parent dafe747dcc
commit ec131b6c7b
3 changed files with 35 additions and 1 deletions

View File

@@ -135,7 +135,11 @@ fn where_predicate(p: &mut Parser) {
if p.at(FOR_KW) {
types::for_binder(p);
}
types::path_type(p);
if paths::is_path_start(p) || p.at(L_ANGLE) {
types::path_type_(p, false);
} else {
p.error("expected a type");
}
if p.at(COLON) {
bounds(p);
} else {