sway icon indicating copy to clipboard operation
sway copied to clipboard

Fix remaining issues in raw identifiers

Open ironcev opened this issue 8 months ago • 3 comments

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)

ironcev avatar Apr 30 '25 12:04 ironcev

I’d like to work on this.

pheobeayo avatar May 05 '25 21:05 pheobeayo

Could I take over this issue?

BlessingEmejulu avatar May 08 '25 14:05 BlessingEmejulu

I’d like to resolve this.

7gbice avatar May 11 '25 07:05 7gbice