aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-07-27 00:45:36 +0100
committergingerBill <bill@gingerbill.org>2019-07-27 00:45:36 +0100
commit40f0e74b8c93f753479c6d0ed52d0b1a812f6acd (patch)
tree45306bd04c15ec17394c71396fe1a08f324bf12d /src/check_decl.cpp
parentd26033eb23c74ae4fc83dc6aaf2f2ec6571f2661 (diff)
Change scoping rules to allow for shadowing of procedure parameters but not named return values
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 1a6fad918..f3e0f70bc 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -1141,7 +1141,7 @@ void check_proc_body(CheckerContext *ctx_, Token token, DeclInfo *decl, Type *ty
}
ast_node(bs, BlockStmt, body);
- // check_open_scope(ctx, body);
+ check_open_scope(ctx, body);
check_stmt_list(ctx, bs->stmts, Stmt_CheckScopeDecls);
if (type->Proc.result_count > 0) {
if (!check_is_terminating(body)) {
@@ -1153,7 +1153,7 @@ void check_proc_body(CheckerContext *ctx_, Token token, DeclInfo *decl, Type *ty
}
}
}
- // check_close_scope(ctx);
+ check_close_scope(ctx);
check_scope_usage(ctx->checker, ctx->scope);