summaryrefslogtreecommitdiff
path: root/test/struct1.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2013-12-16 16:48:38 -0500
committerOri Bernstein <ori@eigenstate.org>2013-12-16 16:48:38 -0500
commit28a86b79b0ab5a89b292728882bd01bcfc12bcdf (patch)
tree0f0109e5d1d57918f4d679a2062a19965605916a /test/struct1.myr
parentd04544b4bbe5d5e101af128cfeebc194d65fab01 (diff)
downloadmc-28a86b79b0ab5a89b292728882bd01bcfc12bcdf.tar.gz
Convert main() to effectively return void.
Now, if we exit thorugh the end of main, we will ignore the return value, and call exit(0) from the start stub. If you want to exit with a different return value, you need to call std.exit(val)
Diffstat (limited to 'test/struct1.myr')
-rw-r--r--test/struct1.myr2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/struct1.myr b/test/struct1.myr
index c9c1880..58e822c 100644
--- a/test/struct1.myr
+++ b/test/struct1.myr
@@ -9,5 +9,5 @@ type val = struct
const main = {
var s : val
s.a = 12
- -> s.a
+ std.exit(s.a)
}