mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
fix duplicate type defined when imported from parseh
This commit is contained in:
parent
49a4b1b930
commit
f2fc9b8a7b
@ -1589,6 +1589,11 @@ static void preview_fn_proto(CodeGen *g, ImportTableEntry *import, AstNode *prot
|
||||
static void scan_struct_decl(CodeGen *g, ImportTableEntry *import, BlockContext *context, AstNode *node) {
|
||||
assert(node->type == NodeTypeStructDecl);
|
||||
|
||||
if (node->data.struct_decl.type_entry) {
|
||||
// already scanned; we can ignore. This can happen from importing from an .h file.
|
||||
return;
|
||||
}
|
||||
|
||||
Buf *name = &node->data.struct_decl.name;
|
||||
TypeTableEntry *container_type = get_partial_container_type(g, import, context,
|
||||
node->data.struct_decl.kind, node, buf_ptr(name));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user