FuelLabs/sway

Enforce type annotations for constants

Open

Aperta il 20 mar 2024

Vedi su GitHub
 (5 commenti) (0 reazioni) (0 assegnatari)Rust (61.702 star) (5421 fork)batch import
ODHack12bugcompiler: frontendgood first issueteam:compiler

Descrizione

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

Guida contributor