diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-09-18 09:49:57 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-09-18 09:49:57 -0400 |
| commit | d353d5aef8bfc5c701ab8958751ef74f6704342b (patch) | |
| tree | ebdd1d8f385db5056c903cc74f1ebf3f1f381b1d /src/ir.cpp | |
| parent | 68c1d059178a36add751e97e11cee004cfdf612e (diff) | |
| download | zig-d353d5aef8bfc5c701ab8958751ef74f6704342b.tar.gz zig-d353d5aef8bfc5c701ab8958751ef74f6704342b.zip | |
fix @bytesToSlice on a packed struct
closes #1551
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 0cb09df011..5da0008e03 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -18516,6 +18516,9 @@ static ZigType *ir_analyze_instruction_from_bytes(IrAnalyze *ira, IrInstructionF src_ptr_align = get_abi_alignment(ira->codegen, target->value.type); } + if ((err = type_resolve(ira->codegen, dest_child_type, ResolveStatusSizeKnown))) + return ira->codegen->builtin_types.entry_invalid; + ZigType *dest_ptr_type = get_pointer_to_type_extra(ira->codegen, dest_child_type, src_ptr_const, src_ptr_volatile, PtrLenUnknown, src_ptr_align, 0, 0); |
