diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2015-12-23 03:19:22 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2015-12-23 03:19:22 -0700 |
| commit | e21369a1539063773734432993bc2c23680f0913 (patch) | |
| tree | b48333c170245c8e95f7dd75bcef81a84d4dc9f2 /src/analyze.cpp | |
| parent | ebd7aeb5411c8dba35d6898524928d7ee905c06b (diff) | |
| download | zig-e21369a1539063773734432993bc2c23680f0913.tar.gz zig-e21369a1539063773734432993bc2c23680f0913.zip | |
codegen: support byvalue struct assignment
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 35e94cd8e4..fb27986b48 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -276,8 +276,11 @@ static void resolve_struct_type(CodeGen *g, ImportTableEntry *import, TypeTableE AstNode *decl_node = struct_type->data.structure.decl_node; if (struct_type->data.structure.embedded_in_current) { - add_node_error(g, decl_node, - buf_sprintf("struct has infinite size")); + if (!struct_type->data.structure.reported_infinite_err) { + struct_type->data.structure.reported_infinite_err = true; + add_node_error(g, decl_node, + buf_sprintf("struct has infinite size")); + } return; } |
