diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-09-29 21:35:59 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-09-29 21:35:59 +0100 |
| commit | 8c7cf0dbb0b4cf9730788c619c8cb9adf8f284a1 (patch) | |
| tree | 4c1c42933a94a52a7eb7bed7868ffe0a985558bf /src/ir_print.cpp | |
| parent | e6e9375b091ad7ecf83be53a081e08ee87482118 (diff) | |
Fix union array bug (Issue #112)
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index 6381b5d68..ec60bbc41 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -399,7 +399,7 @@ void ir_print_compound_element(irFileBuffer *f, irModule *m, ExactValue v, Type ir_print_type(f, m, elem_type); ir_write_byte(f, ' '); - if (v.kind == ExactValue_Invalid || base_type(elem_type) == t_any) { + if (v.kind == ExactValue_Invalid || !elem_type_can_be_constant(elem_type)) { if (ir_type_has_default_values(elem_type)) { ir_print_exact_value(f, m, v, elem_type); } else { |