Closed
Description
It seems like the star token is not handled in constrained types as it should be. This can be noticed in the parse_carg function, it begins by matching (peek ps) against IDENT _, the IDENT token doesn't include stars (that is what the STAR token is for). Note that parse_carg_base seems to be able to handle stars (it matches against STAR).
An example of non-working code for this is:
// -- rust --
type list = tag(cons(int,@list), nil());
type bubu = rec(int x, int y);
fn less_than(int x, int y) -> bool { ret x < y; }
type ordered_range = rec(int low, int high) : less_than(*.low, *.high);
fn main() {
cons(10, @COns(11, @COns(12, @nil())));
}
This code returns with an error saying that * is unexpected.
Metadata
Metadata
Assignees
Labels
No labels