From e403475bbf6f70b3e79b6f4503dbadcc3dad504c Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Sat, 29 Jan 2022 13:52:58 -0500 Subject: Allow uninitialized variable declarations --- examples/variables.cup | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/variables.cup b/examples/variables.cup index 3ee8ed2..60a7d6a 100644 --- a/examples/variables.cup +++ b/examples/variables.cup @@ -1,8 +1,7 @@ -fn main() { - let x: int = 5 * 10; - let y: int = x + x; - let z: int = y - x / 2; - return z; +fn main(): int { + let x: int; + let y: int; + return x; } -- cgit v1.2.3