FuelLabs/sway

Enforce type annotations for constants

Open

#5,758 opened on Mar 20, 2024

 (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
 (PR metrics pending)

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