diff --git a/vlib/v/builder/builder.v b/vlib/v/builder/builder.v index 1d73dbf712..7b5f96068c 100644 --- a/vlib/v/builder/builder.v +++ b/vlib/v/builder/builder.v @@ -173,7 +173,7 @@ pub fn (mut b Builder) resolve_deps() { // graph of all imported modules pub fn (b &Builder) import_graph() &depgraph.DepGraph { - builtins := util.builtin_module_parts + builtins := util.builtin_module_parts.clone() mut graph := depgraph.new_dep_graph() for p in b.parsed_files { mut deps := []string{} diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 2cd848d61b..d9812378fd 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -2210,9 +2210,10 @@ pub fn (mut c Checker) assign_stmt(mut assign_stmt ast.AssignStmt) { continue } if left_sym.kind == .array && - assign_stmt.op == .assign && right_sym.kind == .array && left is ast.Ident && right is ast.Ident { + assign_stmt.op in [.assign, .decl_assign] && right_sym.kind == .array && left is ast.Ident && + right is ast.Ident { // Do not allow `a = b`, only `a = b.clone()` - c.warn('use `array2 = array1.clone()` instead of `array1 = array2`', assign_stmt.pos) + c.warn('use `array2 = array1.clone()` instead of `array2 = array1`', assign_stmt.pos) } left_is_ptr := left_type.is_ptr() || left_sym.is_pointer() if left_is_ptr {