Skip to content

Auto implementation panics when raw identifiers are used for fallback function name #7135

Closed
@ironcev

Description

@ironcev

E.g, this program:

contract;

#[fallback]
fn r#fn() {
}

panics with:

thread 'main' panicked at sway-core/src/semantic_analysis/ast_node/declaration/auto_impl/mod.rs:70:9:
Handler { inner: RefCell { value: HandlerInner { errors: [Parse { error: ParseError { span: Span { src (ptr): 0x5589ff417930, source_id: Some(SourceId(1048669)), start: 211, end: 213, as_str(): "fn" }, kind: ReservedKeywordIdentifier } }], warnings: [] } } }

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