aboutsummaryrefslogtreecommitdiff
path: root/core/runtime
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-10-13 11:07:56 +0100
committergingerBill <bill@gingerbill.org>2018-10-13 11:07:56 +0100
commit73e9dbbf8c4a68dc6c512eb2de568d59df046494 (patch)
treebb2806ad8b6b078ff3b901cd2e5dba857dc23f32 /core/runtime
parent0971a59493d601458ccb386a3752a75f6d880b8f (diff)
switch on typeid with type cases
Diffstat (limited to 'core/runtime')
-rw-r--r--core/runtime/internal.odin6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/runtime/internal.odin b/core/runtime/internal.odin
index 80ade1272..3380412d7 100644
--- a/core/runtime/internal.odin
+++ b/core/runtime/internal.odin
@@ -63,8 +63,7 @@ print_type :: proc(fd: os.Handle, ti: ^Type_Info) {
case Type_Info_Named:
os.write_string(fd, info.name);
case Type_Info_Integer:
- a := any{id = ti.id};
- switch _ in a {
+ switch ti.id {
case int: os.write_string(fd, "int");
case uint: os.write_string(fd, "uint");
case uintptr: os.write_string(fd, "uintptr");
@@ -83,8 +82,7 @@ print_type :: proc(fd: os.Handle, ti: ^Type_Info) {
case Type_Info_String:
os.write_string(fd, "string");
case Type_Info_Boolean:
- a := any{id = ti.id};
- switch _ in a {
+ switch ti.id {
case bool: os.write_string(fd, "bool");
case:
os.write_byte(fd, 'b');