aboutsummaryrefslogtreecommitdiff
path: root/boot/type_check.cc
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-08-23 20:01:55 +0200
committerEugen Wissner <belka@caraus.de>2026-08-23 20:01:55 +0200
commit7d0d0eb69589ab8e0c8b036a3b642593a372b041 (patch)
treecf3731cec0ab67a0d574450fbe24c3cff4a7a9e6 /boot/type_check.cc
parentbf41d022ce9736a92097f416ab96fca7ab4594ca (diff)
downloadelna-7d0d0eb69589ab8e0c8b036a3b642593a372b041.tar.gz
Determine array type by the first element
Diffstat (limited to 'boot/type_check.cc')
-rw-r--r--boot/type_check.cc7
1 files changed, 0 insertions, 7 deletions
diff --git a/boot/type_check.cc b/boot/type_check.cc
index e810e30..ad27337 100644
--- a/boot/type_check.cc
+++ b/boot/type_check.cc
@@ -984,13 +984,6 @@ namespace elna::boot
type_mismatch_error::expected_type{ type(std::make_shared<array_type>(type(), 0)) });
return;
}
- if (expression->elements.size() > array->size)
- {
- add_error<argument_count_error>(expression->position(),
- argument_count_error::kind::array, expression->type_decoration.to_string(),
- array->size, expression->elements.size());
- return;
- }
for (auto *element : expression->elements)
{
if (!is_assignable_from(array->base, element->type_decoration))