Skip to content

Enforce type annotations for constants #5758

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

Open
IGI-111 opened this issue Mar 20, 2024 · 4 comments · May be fixed by #7054
Open

Enforce type annotations for constants #5758

IGI-111 opened this issue Mar 20, 2024 · 4 comments · May be fixed by #7054
Labels
bug Something isn't working compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen good first issue Good for newcomers ODHack12 team:compiler Compiler Team

Comments

@IGI-111
Copy link
Contributor

IGI-111 commented Mar 20, 2024

We should ensure all const declarations have explicitly named types and provide a helpful error message when they do not.

const OFFSET_TOKEN_ADDRESS = 32; // forbidden
const OFFSET_TOKEN_ADDRESS: u64 = 32; // allowed
@IGI-111 IGI-111 added bug Something isn't working good first issue Good for newcomers compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen labels Mar 20, 2024
@ironcev ironcev self-assigned this Jul 23, 2024
@IGI-111 IGI-111 added the team:compiler Compiler Team label Feb 10, 2025
@ikemHood
Copy link

I’d like to help with this.

I understand that this is a compiler and you want me to implement that every conts has a well defined type

@cryptogru812
Copy link

I’d like to help with this.

@FriendlyLifeguard
Copy link

Hello, could I work on this?

@saimeunt
Copy link
Contributor

Following up on my work on #7042 and #7043, I'd like to continue fixing issues on Sway, please assign me.

saimeunt added a commit to saimeunt/sway that referenced this issue Apr 1, 2025
@saimeunt saimeunt linked a pull request Apr 1, 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
bug Something isn't working compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen good first issue Good for newcomers ODHack12 team:compiler Compiler Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants