Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ironcev opened this issue Apr 30, 2025 · 0 comments · Fixed by #7137
Closed

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

ironcev opened this issue Apr 30, 2025 · 0 comments · Fixed by #7137
Labels
bug Something isn't working compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: parser Everything to do with the parser compiler General compiler. Should eventually become more specific as the issue is triaged team:compiler Compiler Team

Comments

@ironcev
Copy link
Member

ironcev commented Apr 30, 2025

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: [] } } }
@ironcev ironcev added bug Something isn't working compiler General compiler. Should eventually become more specific as the issue is triaged compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: parser Everything to do with the parser team:compiler Compiler Team labels Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: parser Everything to do with the parser compiler General compiler. Should eventually become more specific as the issue is triaged team:compiler Compiler Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant