From 6b131c925dee7a5f97516edd581e051e08bb52d8 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Mon, 20 Jul 2026 16:09:24 +0200 Subject: Implement min and max for booleans and floats --- boot/name_analysis.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'boot/name_analysis.cc') diff --git a/boot/name_analysis.cc b/boot/name_analysis.cc index 22b7814..54a2d1a 100644 --- a/boot/name_analysis.cc +++ b/boot/name_analysis.cc @@ -539,9 +539,10 @@ for (const auto& member : expression->members) if (!trait->type_decoration.empty()) { type const resolved = resolve_underlying_type(trait->type_decoration); - bool const is_enum = resolved.get() != nullptr; - if (!is_enum && !is_discrete_type(resolved)) + if (resolved.get() == nullptr + && !is_primitive_type(resolved, "Float") + && !is_discrete_type(resolved)) { add_error(trait->name, trait->type_decoration); -- cgit v1.2.3