mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-18 03:42:23 -07:00
Fix #complete switch with pointer case doesn't compile #416
This commit is contained in:
+2
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user