feat: let mut 改为 var 关键字声明可变变量
This commit is contained in:
+1
-1
@@ -683,7 +683,7 @@ static void analyze_node(AstNode* node, Scope* scope, ErrorList* errors, Arena*
|
||||
}
|
||||
if (!sym->is_mut) {
|
||||
error_add(errors, "<sema>", node->loc.line, node->loc.col,
|
||||
"不能对不可变变量 '%s' 赋值(需用 let mut 声明)",
|
||||
"不能对不可变变量 '%s' 赋值(需用 var 声明)",
|
||||
node->as.assign_stmt.name);
|
||||
node->type.kind = TYPE_ERROR;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user