aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2021-04-26 20:50:43 +0100
committerGitHub <noreply@github.com>2021-04-26 20:50:43 +0100
commit53c7e65c57ff0042a0851781712d8fc1e5cae8be (patch)
tree1640bdc8740d0fa6fbdd8231b5cd0235727cdba5 /src/check_decl.cpp
parentaa846d0ea5f40361cc4ada2213c4659fe1b59580 (diff)
parenta38586420cd2d8534a7be83851d8ca174cce1bcb (diff)
Merge pull request #914 from odin-lang/old-backend-removal
Removal of the Old Backend
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index 85c58fdf9..218dce2ee 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -460,14 +460,14 @@ void check_const_decl(CheckerContext *ctx, Entity *e, Ast *type_expr, Ast *init,
case Entity_LibraryName:
case Entity_ImportName:
{
- override_entity_in_scope(e, entity);
-
DeclInfo *decl = decl_info_of_entity(e);
if (decl != nullptr) {
if (decl->attributes.count > 0) {
error(decl->attributes[0], "Constant alias declarations cannot have attributes");
}
}
+
+ override_entity_in_scope(e, entity);
return;
}
}