Skip to content

Parser rejects some uses of inner constraints #971

Closed

Description

tag ordered_pair_list {
    cons({low: int, high: int} : lt(*.low, *.high), @ordered_pair_list);
    nil;
}
pure fn lt(x: int, y: int) -> bool { ret x < y; }
fn main() { }

Gives me

tmp.rs:2:52: 2:53 error: expecting (, found @
tmp.rs:2     cons({low: int, high: int} : lt(*.low, *.high), @ordered_pair_list);

But if I take out the ", @ordered_pair_list" part, the parser accepts it (and I hit #970 instead).

Are inner constraints valid?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions