aboutsummaryrefslogtreecommitdiff
path: root/boot/name_analysis.cc
diff options
context:
space:
mode:
Diffstat (limited to 'boot/name_analysis.cc')
-rw-r--r--boot/name_analysis.cc14
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();