Browse Source

Patch "no_copy" typo in parser.cpp

matias 2 years ago
parent
commit
277ae4e2b0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/parser.cpp

+ 1 - 1
src/parser.cpp

@@ -2462,7 +2462,7 @@ gb_internal Ast *parse_operand(AstFile *f, bool lhs) {
 				}
 				}
 				is_raw_union = true;
 				is_raw_union = true;
 			} else if (tag.string == "no_copy") {
 			} else if (tag.string == "no_copy") {
-				if (is_packed) {
+				if (no_copy) {
 					syntax_error(tag, "Duplicate struct tag '#%.*s'", LIT(tag.string));
 					syntax_error(tag, "Duplicate struct tag '#%.*s'", LIT(tag.string));
 				}
 				}
 				no_copy = true;
 				no_copy = true;