mirror of
https://github.com/ziglang/zig.git
synced 2025-12-31 10:33:19 +00:00
src/analyze.cpp: return type entry for ZigTypeIdPointer if it points to ZigTypeIdOpaque
ref: ziglang/zig#1883
This commit is contained in:
parent
c968d8756c
commit
0d1ce1fb5f
@ -5751,6 +5751,13 @@ void eval_min_max_value(CodeGen *g, ZigType *type_entry, ConstExprValue *const_v
|
||||
}
|
||||
|
||||
void render_const_val_ptr(CodeGen *g, Buf *buf, ConstExprValue *const_val, ZigType *type_entry) {
|
||||
assert(type_entry->id == ZigTypeIdPointer);
|
||||
|
||||
if (type_entry->data.pointer.child_type->id == ZigTypeIdOpaque) {
|
||||
buf_append_buf(buf, &type_entry->name);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (const_val->data.x_ptr.special) {
|
||||
case ConstPtrSpecialInvalid:
|
||||
zig_unreachable();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user