diff options
Diffstat (limited to 'code')
| -rw-r--r-- | code/demo.odin | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/code/demo.odin b/code/demo.odin index 70f50c388..86a132142 100644 --- a/code/demo.odin +++ b/code/demo.odin @@ -69,6 +69,21 @@ main :: proc() { } { + t := type_info(int); + using Type_Info; + match i in t { + case Integer, Float: + fmt.println("It's a number"); + } + + x: any = 123; + match i in x { + case int, f32: + fmt.println("It's an int or f32"); + } + } + + { cond := true; x: int; if cond { |