From fd81c06c35f1cca9153be9f78dc5ecc4ae503d0e Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Wed, 28 Jun 2017 23:55:40 +0100 Subject: Remove `var` and `const` keywords; Fix default parameter syntax --- src/check_stmt.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/check_stmt.cpp') 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); } } -- cgit v1.2.3