diff options
Diffstat (limited to 'boot/name_analysis.cc')
| -rw-r--r-- | boot/name_analysis.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/boot/name_analysis.cc b/boot/name_analysis.cc index d4b8643..30d3cda 100644 --- a/boot/name_analysis.cc +++ b/boot/name_analysis.cc @@ -470,12 +470,13 @@ namespace elna::boot void name_analysis_visitor::visit(array_constructor_expression *expression) { - expression->array_type().accept(this); - expression->type_decoration = this->current_type; for (auto *element : expression->elements) { element->accept(this); } + const type element_type = expression->elements.front()->type_decoration; + expression->type_decoration = type(std::make_shared<array_type>(element_type, + expression->elements.size())); this->current_type = type(); } |
