Skip to content

Parser rejects "if (ret) { }" #676

Closed
@jruderman

Description

@jruderman
fn main() {
    if (ret) { }
}

/Users/jruderman/Desktop/a.rs:2:15:2:16: error: unexpected token: )

This should be accepted by both the parser and the type-checker (but perhaps trigger a warning). Found through AST fuzzing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions