mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
Sema: allow C pointers in fieldCallBind
This commit is contained in:
parent
8a488fcdb8
commit
393d59bb72
@ -19466,7 +19466,7 @@ fn fieldCallBind(
|
||||
|
||||
const raw_ptr_src = src; // TODO better source location
|
||||
const raw_ptr_ty = sema.typeOf(raw_ptr);
|
||||
const inner_ty = if (raw_ptr_ty.zigTypeTag() == .Pointer and raw_ptr_ty.ptrSize() == .One)
|
||||
const inner_ty = if (raw_ptr_ty.zigTypeTag() == .Pointer and (raw_ptr_ty.ptrSize() == .One or raw_ptr_ty.ptrSize() == .C))
|
||||
raw_ptr_ty.childType()
|
||||
else
|
||||
return sema.fail(block, raw_ptr_src, "expected single pointer, found '{}'", .{raw_ptr_ty.fmt(sema.mod)});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user