diff options
| author | LemonBoy <thatlemon@gmail.com> | 2020-04-22 16:54:11 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-04-22 14:40:57 -0400 |
| commit | b5e72c0148e40df418bdc8e1770b1bd42e76732e (patch) | |
| tree | 69c741c4fcc2bef40e7b6031ae6eea25b67588db /src/analyze.cpp | |
| parent | 173a143dd04f9ec75355c04be9b0e6353ee9bc03 (diff) | |
| download | zig-b5e72c0148e40df418bdc8e1770b1bd42e76732e.tar.gz zig-b5e72c0148e40df418bdc8e1770b1bd42e76732e.zip | |
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
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 89ad5aca74..28b1f0cd76 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -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: |
