summaryrefslogtreecommitdiff
path: root/test.lang
diff options
context:
space:
mode:
Diffstat (limited to 'test.lang')
-rw-r--r--test.lang7
1 files changed, 5 insertions, 2 deletions
diff --git a/test.lang b/test.lang
index f717086..d7f3c89 100644
--- a/test.lang
+++ b/test.lang
@@ -1,6 +1,9 @@
func main(a, b i64) i64 {
if a < b {
- return a + b
+ let t = a
+ a := b
+ b := t
}
- return b
+ /* TODO: error on failing to return from a function */
+ return a + b
}