From 4f77ad5d019618893c59a0f8d5bfa6b98e50a3be Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Tue, 18 Aug 2026 13:31:47 +0200 Subject: Make Int and Word aliases to fixed-size types --- boot/type_check.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'boot/type_check.cc') diff --git a/boot/type_check.cc b/boot/type_check.cc index e58a50e..d830763 100644 --- a/boot/type_check.cc +++ b/boot/type_check.cc @@ -569,7 +569,8 @@ namespace elna::boot .right = case_label->type_decoration, .operation = binary_operator::equals }; - add_error(case_label->position(), condition_type, binary_error); + add_error(case_label->position(), + statement->condition().type_decoration, binary_error); } } } @@ -843,7 +844,8 @@ namespace elna::boot } else if (operation == unary_operator::minus) { - if (!is_primitive_type(resolved, "Int") + auto signed_primitive = resolved.get(); + if ((signed_primitive == nullptr || !signed_primitive->identifier.starts_with("Int")) && !is_primitive_type(resolved, "Float")) { add_error(expression->position(), -- cgit v1.2.3