aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-10-01 17:09:57 +0100
committerGinger Bill <bill@gingerbill.org>2017-10-01 17:09:57 +0100
commitc1e720a49b3dedf5ad8f0b4b2b444bf3f160834f (patch)
tree84acc5f822df2d2eea85564d0077f730ae15644d /examples
parentf38c8875b2211ac6112ff7b17e3cbb31a09757fb (diff)
`match` to `switch`; Optional semicolons after "import" statements
Diffstat (limited to 'examples')
-rw-r--r--examples/demo.odin8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/demo.odin b/examples/demo.odin
index a744d7234..33bd29099 100644
--- a/examples/demo.odin
+++ b/examples/demo.odin
@@ -150,7 +150,7 @@ union_type :: proc() {
val = nil;
- match v in val {
+ switch v in val {
case int: fmt.println("int", v);
case bool: fmt.println("bool", v);
case: fmt.println("nil");
@@ -171,7 +171,7 @@ union_type :: proc() {
val = nil;
- match v in val {
+ switch v in val {
case int: fmt.println("int", v);
case bool: fmt.println("bool", v);
case: fmt.println("nil");
@@ -218,7 +218,7 @@ union_type :: proc() {
entity := new_entity(Monster);
- match e in entity.derived {
+ switch e in entity.derived {
case Frog:
fmt.println("Ribbit");
case Monster:
@@ -262,7 +262,7 @@ union_type :: proc() {
entity := new_entity(Monster);
- match e in entity.derived {
+ switch e in entity.derived {
case Frog:
fmt.println("Ribbit");
case Monster: