From 7fa2d25eea28955c12d8fc6a597e8615562c0ee9 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 5 Oct 2019 10:22:41 +0100 Subject: Fix #complete switch with pointer case doesn't compile #416 --- src/check_stmt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/check_stmt.cpp') diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 9163fadc2..26e3f8c26 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -1205,7 +1205,7 @@ void check_type_switch_stmt(CheckerContext *ctx, Ast *node, u32 mod_flags) { GB_PANIC("Unknown type to type switch statement"); } - if (ptr_set_exists(&seen, y.type)) { + if (type_ptr_set_exists(&seen, y.type)) { TokenPos pos = cc->token.pos; gbString expr_str = expr_to_string(y.expr); error(y.expr, @@ -1257,7 +1257,7 @@ void check_type_switch_stmt(CheckerContext *ctx, Ast *node, u32 mod_flags) { for_array(i, variants) { Type *t = variants[i]; - if (!ptr_set_exists(&seen, t)) { + if (!type_ptr_set_exists(&seen, t)) { array_add(&unhandled, t); } } -- cgit v1.2.3