Multiple type cases for match in

This commit is contained in:
Ginger Bill committed 2017-03-19 20:55:39 +00:00
1 parent c34d839f9f
commit c26990c22d
5 files changed
+193 -188

No files matched your search

+15
View File
@@ -68,6 +68,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;