From 1c2fb173ea3b674207badc721556ad72962b266e Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sun, 2 Aug 2026 17:05:34 +0200 Subject: Check array property accessbility at compile time --- boot/name_analysis.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'boot/name_analysis.cc') diff --git a/boot/name_analysis.cc b/boot/name_analysis.cc index e4f1920..3667dff 100644 --- a/boot/name_analysis.cc +++ b/boot/name_analysis.cc @@ -41,13 +41,14 @@ namespace elna::boot { switch (payload) { - case kind::undeclared_type: + using enum kind; + case undeclared_type: return "Type '" + this->name + "' not declared"; - case kind::undeclared_trait: + case undeclared_trait: return "Trait '#" + this->name + "' not declared"; - case kind::undeclared_symbol: + case undeclared_symbol: return "Symbol '" + this->name + "' not declared"; - case kind::local_export: + case local_export: return "Local symbol '" + this->name + "' cannot be exported"; default: __builtin_unreachable(); @@ -77,9 +78,10 @@ namespace elna::boot { switch (error_kind) { - case kind::array_position: + using enum kind; + case array_position: return "const must be written before the array size, not after"; - case kind::duplicate: + case duplicate: return "Duplicate 'const' qualifier is not allowed"; default: __builtin_unreachable(); -- cgit v1.2.3