浏览代码

Fix `new(sync.Mutex)`

gingerBill 1 年之前
父节点
当前提交
b4bdb73158
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/check_expr.cpp

+ 1 - 1
src/check_expr.cpp

@@ -5738,7 +5738,7 @@ gb_internal bool check_identifier_exists(Scope *s, Ast *node, bool nested = fals
 gb_internal bool check_no_copy_assignment(Operand const &o, String const &context) {
 	if (o.type && is_type_no_copy(o.type)) {
 		Ast *expr = unparen_expr(o.expr);
-		if (expr && o.mode != Addressing_Constant) {
+		if (expr && o.mode != Addressing_Constant && o.mode != Addressing_Type) {
 			if (expr->kind == Ast_CallExpr) {
 				// Okay
 			} else {