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 (61,702 stars) (5,421 forks)batch import
ODHack12bugcompiler: frontendgood first issueteam:compiler

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