update compile error tests

This commit is contained in:
Andrew Kelley 2020-03-26 14:07:19 -04:00
parent 0d4354324c
commit ab20b351ce
No known key found for this signature in database
GPG key ID: 7C5F548F728501A9

View file

@ -2184,7 +2184,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
cases.add("don't implicit cast double pointer to *c_void",
\\export fn entry() void {
\\ var a: u32 = 1;
\\ var ptr: *c_void = &a;
\\ var ptr: *align(@alignOf(u32)) c_void = &a;
\\ var b: *u32 = @ptrCast(*u32, ptr);
\\ var ptr2: *c_void = &b;
\\}