aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-12-21 15:20:33 +0000
committerGinger Bill <bill@gingerbill.org>2016-12-21 15:20:33 +0000
commit923b039cf6e7b306f42c5319d66f0a382378935f (patch)
treecf1fb35d95f5884dc9af42eb033d722652838fa9 /code
parentd0e1efe622f921fd763f5d88cc5011e940f0c9cd (diff)
Fix anonymous procedures and their dependencies
Diffstat (limited to 'code')
-rw-r--r--code/demo.odin23
1 files changed, 8 insertions, 15 deletions
diff --git a/code/demo.odin b/code/demo.odin
index 6bf3748c0..f93c1575b 100644
--- a/code/demo.odin
+++ b/code/demo.odin
@@ -10,22 +10,15 @@ import (
"utf8.odin";
)
-type Byte_Size f64;
-const (
- _ = iota; // ignore first value by assigning to blank identifier
- KB Byte_Size = 1 << (10 * iota);
- // Because there is no type or expression, the previous one is used but
- // with `iota` incremented by one
- MB;
- GB;
- TB;
- PB;
- EB;
-)
-
-
proc main() {
- fmt.println("Here");
+ var x = proc() -> int {
+ proc print_here() {
+ fmt.println("Here");
+ }
+ print_here();
+ return 1;
+ };
+ fmt.println(x());
}