summaryrefslogtreecommitdiff
path: root/test.lang
diff options
context:
space:
mode:
Diffstat (limited to 'test.lang')
-rw-r--r--test.lang19
1 files changed, 9 insertions, 10 deletions
diff --git a/test.lang b/test.lang
index f46b8a0..5535a4e 100644
--- a/test.lang
+++ b/test.lang
@@ -1,17 +1,16 @@
func main(a, b i64) i64 {
- /*if a = b {
+ if a = b {
let t = a
a := b
b := t
} else {
- let t = a
- a := b
- b := t
- }*/
- /* TODO: error on failing to return from a function */
- if a < b {
- return 237 + a + 812734 + b + 81753 + 2389
- } else {
- return 1 + a + 7 + 123897
+ a := 5
+ b := 10
+ if a = b {
+ let t = a
+ a := b
+ b := t
+ }
}
+ return a + b
}