feat: add support for let statements

This commit is contained in:
2026-04-21 23:03:03 +02:00
parent 42ba357302
commit 3fe307eff8
8 changed files with 212 additions and 10 deletions
+11
View File
@@ -0,0 +1,11 @@
fn main() -> i32 {
let a = 10;
let b: i32 = 20;
let c = a + b;
{
// Shadow 'a' and 'c' in a new scope
let a = 5;
let c = a + b;
}
return c; // Should return 30, not 25, because the inner 'c' is dropped
}