aboutsummaryrefslogtreecommitdiff
path: root/src/check_stmt.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-06-28 23:55:40 +0100
committerGinger Bill <bill@gingerbill.org>2017-06-28 23:55:40 +0100
commitfd81c06c35f1cca9153be9f78dc5ecc4ae503d0e (patch)
tree424db1c7df1f00f98b8042818681b8149cff01e1 /src/check_stmt.cpp
parent94afcec7577f24d7f027f72765928e6dc5738234 (diff)
Remove `var` and `const` keywords; Fix default parameter syntax
Diffstat (limited to 'src/check_stmt.cpp')
-rw-r--r--src/check_stmt.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp
index 32d6e9d91..5d42a9fe9 100644
--- a/src/check_stmt.cpp
+++ b/src/check_stmt.cpp
@@ -1654,12 +1654,8 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) {
for_array(i, fb->decls) {
AstNode *decl = fb->decls[i];
- if (decl->kind == AstNode_GenDecl) {
- switch (decl->GenDecl.token.kind) {
- case Token_var:
- check_stmt(c, decl, flags);
- break;
- }
+ if (decl->kind == AstNode_ValueDecl && decl->ValueDecl.is_mutable) {
+ check_stmt(c, decl, flags);
}
}