aboutsummaryrefslogtreecommitdiff
path: root/src/check_stmt.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-11-29 18:36:45 +0000
committergingerBill <bill@gingerbill.org>2018-11-29 18:36:45 +0000
commita747c03f2905a3f6f591e5c8051c354b95d9fc8f (patch)
treea1624179f58613b812856f4c37df6eeb7328fa79 /src/check_stmt.cpp
parent2301ae157c1ef4077a3ca8e87ea4032a29a05ace (diff)
Fix #complete switch on pointers to unions #286
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 7854081aa..3a9e18da1 100644
--- a/src/check_stmt.cpp
+++ b/src/check_stmt.cpp
@@ -1008,7 +1008,7 @@ void check_type_switch_stmt(CheckerContext *ctx, Ast *node, u32 mod_flags) {
}
if (complete) {
- Type *ut = base_type(x.type);
+ Type *ut = base_type(type_deref(x.type));
GB_ASSERT(is_type_union(ut));
auto variants = ut->Union.variants;