Skip to content
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

Forbid using attributes where there are not supposed to be used #6880

Open
ironcev opened this issue Feb 3, 2025 · 0 comments · May be fixed by #6986
Open

Forbid using attributes where there are not supposed to be used #6880

ironcev opened this issue Feb 3, 2025 · 0 comments · May be fixed by #6986
Assignees
Labels
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 Feb 3, 2025

Currently, all attributes can annotate any lexical element on which attributes are allowed, e.g., an item, regardless of annotation making sense or not:

#[fallback]
#[test]
#[storage(read)]
enum E { }

Proposal is to provide a common infrastructure:

  • to declaratively define attribute targets,
  • and for checking violations.
@ironcev ironcev added 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 labels Feb 3, 2025
@IGI-111 IGI-111 added the team:compiler Compiler Team label Feb 10, 2025
@ironcev ironcev self-assigned this Feb 11, 2025
@ironcev ironcev linked a pull request Mar 4, 2025 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

2 participants