diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-07-20 16:09:24 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-07-20 16:09:24 +0200 |
| commit | 6b131c925dee7a5f97516edd581e051e08bb52d8 (patch) | |
| tree | 680ae83121442f777e03aa0a0d1299cc364b95dd /boot/name_analysis.cc | |
| parent | cbbe1593bb0893654bd71e611ca610df03bac768 (diff) | |
| download | elna-6b131c925dee7a5f97516edd581e051e08bb52d8.tar.gz | |
Implement min and max for booleans and floats
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 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<enumeration_type>() != nullptr; - if (!is_enum && !is_discrete_type(resolved)) + if (resolved.get<enumeration_type>() == nullptr + && !is_primitive_type(resolved, "Float") + && !is_discrete_type(resolved)) { add_error<unsupported_trait_type_error>(trait->name, trait->type_decoration); |
