leo
leo copied to clipboard
[Bug] can assign non-const values to const vars
🐛 Bug Report
Code snippet to reproduce
function main(x: u8) -> u8 {
const a: u8 = x;
const b: u8 = a;
let c: u8 = x;
const d: u8 = c;
return d;
}
Stack trace & error message
E:\Work\Aleo\leo-playground>leo\target\debug\leo.exe build
Build Starting...
Build Compiling main program... ("E:\\Work\\Aleo\\leo-playground\\src/main.leo")
Build Complete
Done Finished in 2 milliseconds
Your Environment
- testnet3 commit 5b572278fb1edc94f17807222fe3b710e3ae9962