From a38586420cd2d8534a7be83851d8ca174cce1bcb Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 26 Apr 2021 19:46:42 +0100 Subject: Fix race condition with procedure aliases checking for declarations on constant aliases --- src/check_decl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/check_decl.cpp') 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; } } -- cgit v1.2.3