fix @bytesToSlice on a packed struct

closes #1551
This commit is contained in:
Andrew Kelley
2018-09-18 09:49:57 -04:00
parent 68c1d05917
commit d353d5aef8
2 changed files with 13 additions and 0 deletions

View File

@@ -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);