Sema: validate deref operator type and value

This commit is contained in:
Veikka Tuominen
2022-06-30 17:22:16 +03:00
parent 3c73f71177
commit ae7b32eb62
20 changed files with 91 additions and 43 deletions

View File

@@ -82,7 +82,7 @@ fn memset(dest: ?[*]u8, c: u8, len: usize) callconv(.C) ?[*]u8 {
var d = dest.?;
var n = len;
while (true) {
d.* = c;
d[0] = c;
n -= 1;
if (n == 0) break;
d += 1;