change @bitcast to @ptrcast

See #290
This commit is contained in:
Andrew Kelley
2017-03-31 06:18:20 -04:00
parent 3ca027ca82
commit f8e63c4584
15 changed files with 91 additions and 82 deletions

View File

@@ -41,7 +41,7 @@ const VoidStructFieldsFoo = struct {
test "fn" {
var foo: StructFoo = undefined;
@memset(@bitcast(&u8, &foo), 0, @sizeOf(StructFoo));
@memset(@ptrcast(&u8, &foo), 0, @sizeOf(StructFoo));
foo.a += 1;
foo.b = foo.a == 1;
testFoo(foo);