diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-08-02 17:05:34 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-08-02 17:05:34 +0200 |
| commit | 1c2fb173ea3b674207badc721556ad72962b266e (patch) | |
| tree | 950b1d58b719f3302045e114eee35a426af8b0dd /boot/name_analysis.cc | |
| parent | c07c43bf911f62ad6363c024b3f81ceb4f95b16c (diff) | |
| download | elna-1c2fb173ea3b674207badc721556ad72962b266e.tar.gz | |
Check array property accessbility at compile time
Diffstat (limited to 'boot/name_analysis.cc')
| -rw-r--r-- | boot/name_analysis.cc | 14 |
1 files changed, 8 insertions, 6 deletions
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(); |
