aboutsummaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
Diffstat (limited to 'boot')
-rw-r--r--boot/materialization.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/boot/materialization.cc b/boot/materialization.cc
index 5b200d5..0ca81aa 100644
--- a/boot/materialization.cc
+++ b/boot/materialization.cc
@@ -35,6 +35,8 @@ namespace elna::boot
return "Real literal overflows";
case local_export:
return "Local symbols cannot be exported";
+ case local_extern:
+ return "Local symbols cannot be extern";
case field_export:
return "Record fields cannot be exported";
}
@@ -64,6 +66,11 @@ namespace elna::boot
materialization_error::kind::local_export);
}
}
+ if (!this->in_global_scope && declaration->is_extern)
+ {
+ add_error<materialization_error>(declaration->position(),
+ materialization_error::kind::local_extern);
+ }
}
void materialization_visitor::visit(record_type_expression *expression)