Skip to content

Fix remaining issues in raw identifiers #7136

Open
@ironcev

Description

@ironcev

The should_pass/language/raw_identifiers test extended in #7137 pointed out several issues in the handling of raw identifiers. To reproduce them, uncomment the code marked as TODO linking to this issue. Below is the summary.

If there is a raw ident variable with the same name as a row ident function, the function call fails with the error that the declaration is not a function but a variable:

let v = r#fn(r#fn);

Struct instantiation of a raw-ident named struct cannot find the struct:

let v = r#struct {
    r#u64: 42,
};

Enum instantiation of a raw-ident named enum cannot find the enum:

r#enum::r#bool(false)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompilerGeneral compiler. Should eventually become more specific as the issue is triagedcompiler: frontendEverything to do with type checking, control flow analysis, and everything between parsing and IRgencompiler: parserEverything to do with the parserteam:compilerCompiler Team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions