FuelLabs/sway

Enforce type annotations for constants

Open

#5,758 opened on Mar 20, 2024

View on GitHub
 (5 comments) (0 reactions) (0 assignees)Rust (5,421 forks)batch import
ODHack12bugcompiler: frontendgood first issueteam:compiler

Repository metrics

Stars
 (61,702 stars)
PR merge metrics
 (Avg merge 5d 4h) (19 merged PRs in 30d)

Description

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

Contributor guide