From f8daedce5c73e02dfb2fc59d75777190185584df Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Wed, 29 Jul 2026 01:16:18 +0200 Subject: Validate cast compatibility during semantic analysis --- boot/symbol.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'boot/symbol.cc') diff --git a/boot/symbol.cc b/boot/symbol.cc index e0a89e6..a51ee01 100644 --- a/boot/symbol.cc +++ b/boot/symbol.cc @@ -448,6 +448,14 @@ namespace elna::boot || is_primitive_type(checked, "Pointer"); } + bool is_scalar_type(const type& checked) + { + return is_discrete_type(checked) + || is_primitive_type(checked, "Float") + || is_any_pointer_type(checked) + || checked.get() != nullptr; + } + type get_range_base_type(const type& range) { if (auto array = range.get()) -- cgit v1.2.3