aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-09-28 23:53:07 +0100
committergingerBill <gingerBill@users.noreply.github.com>2025-09-28 23:53:07 +0100
commit4877214f34abbccb8d7b11d773371fa935fe73d3 (patch)
treeeeb46441263d048145da28b9b7aabeafc89e229d /src/types.cpp
parentdd15a5bc8e546177f5a7ac89df464c3ed1e9c305 (diff)
Add more `check_is_operand_compound_lit_constant` uses
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/types.cpp b/src/types.cpp
index 814f99eff..62e47259d 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -2536,7 +2536,10 @@ gb_internal bool elem_type_can_be_constant(Type *t) {
if (t == t_invalid) {
return false;
}
- if (is_type_any(t) || is_type_raw_union(t)) {
+ if (is_type_any(t)) {
+ return false;
+ }
+ if (is_type_raw_union(t)) {
return false;
}
if (is_type_union(t)) {