stage1: Prevent the creation of illegal pointer types
Changing the pointer length from Unknown to Single/C now resets the sentinel value too. Closes #5134
This commit is contained in:
@@ -578,6 +578,7 @@ ZigType *get_pointer_to_type_extra2(CodeGen *g, ZigType *child_type, bool is_con
|
||||
}
|
||||
switch (ptr_len) {
|
||||
case PtrLenSingle:
|
||||
assert(sentinel == nullptr);
|
||||
buf_appendf(&entry->name, "*");
|
||||
break;
|
||||
case PtrLenUnknown:
|
||||
|
||||
Reference in New Issue
Block a user