diff options
| author | LemonBoy <thatlemon@gmail.com> | 2019-12-30 16:48:14 +0100 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-12-30 17:45:09 -0500 |
| commit | 28a8ded95a96b1e2af5d2a73f47db2c967233476 (patch) | |
| tree | ac9bc2f2248988c8ebc99d990ea315c0dcc397d9 /src/analyze.cpp | |
| parent | c1ee846c221a43b3bb3f9e427a2077b444435ec7 (diff) | |
| download | zig-28a8ded95a96b1e2af5d2a73f47db2c967233476.tar.gz zig-28a8ded95a96b1e2af5d2a73f47db2c967233476.zip | |
Resolve more types as needed
Closes #3994
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index b01a9769e8..dacb1d2b70 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -6372,10 +6372,11 @@ static Error resolve_pointer_zero_bits(CodeGen *g, ZigType *ty) { ZigType *elem_type = ty->data.pointer.child_type; - if ((err = type_resolve(g, elem_type, ResolveStatusZeroBitsKnown))) + bool has_bits; + if ((err = type_has_bits2(g, elem_type, &has_bits))) return err; - if (type_has_bits(elem_type)) { + if (has_bits) { ty->abi_size = g->builtin_types.entry_usize->abi_size; ty->size_in_bits = g->builtin_types.entry_usize->size_in_bits; ty->abi_align = g->builtin_types.entry_usize->abi_align; |
