aboutsummaryrefslogtreecommitdiff
path: root/src/check_stmt.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-08-18 12:13:52 +0100
committergingerBill <bill@gingerbill.org>2024-08-18 12:13:52 +0100
commitf82bf6cd42c6a16705883af1e948b9ac85406899 (patch)
treee126faa96dbe51481c369c9faf9de59116b1e887 /src/check_stmt.cpp
parent60b2979cfd5586175cc8314c8711addc19a07f0c (diff)
Fix #4022
Diffstat (limited to 'src/check_stmt.cpp')
-rw-r--r--src/check_stmt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp
index de127b79c..fbcabf3d2 100644
--- a/src/check_stmt.cpp
+++ b/src/check_stmt.cpp
@@ -1478,7 +1478,7 @@ gb_internal void check_type_switch_stmt(CheckerContext *ctx, Ast *node, u32 mod_
case_type = nullptr;
}
if (case_type == nullptr) {
- case_type = x.type;
+ case_type = type_deref(x.type);
}
if (switch_kind == TypeSwitch_Any) {
if (!is_type_untyped(case_type)) {