diff options
| author | gingerBill <bill@gingerbill.org> | 2019-02-19 10:04:36 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-02-19 10:04:36 +0000 |
| commit | f917935f9d0110bb276e5a1fffad02c6a4ae84ea (patch) | |
| tree | 38d831b9b534a37725bee363956ae46c4afa71e7 /src/check_expr.cpp | |
| parent | dbd06388538b3ba38ab4e5d03c4bc695854f5ff0 (diff) | |
Disallow compound literals for `struct #raw_union` (fix)
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index e5140ce25..79f980a79 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -5778,7 +5778,7 @@ ExprKind check_expr_base_internal(CheckerContext *c, Operand *o, Ast *node, Type if (cl->elems.count == 0) { break; // NOTE(bill): No need to init } - if (!is_type_struct(t)) { + if (t->Struct.is_raw_union) { if (cl->elems.count != 0) { gbString type_str = type_to_string(type); error(node, "Illegal compound literal type '%s'", type_str); |