diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-05-31 10:56:59 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-05-31 17:28:07 -0400 |
| commit | fcbb7426faac5e693ef195defe2d8d2a2eddadb1 (patch) | |
| tree | d34d161ccdbdacb0d0177b79aeb54605f9a49bd3 /test/cases/enum_with_members.zig | |
| parent | 717ac85a5acb5e6ae063c4d0eb3b8f1bd260776a (diff) | |
| download | zig-fcbb7426faac5e693ef195defe2d8d2a2eddadb1.tar.gz zig-fcbb7426faac5e693ef195defe2d8d2a2eddadb1.zip | |
use * for pointer type instead of &
See #770
To help automatically translate code, see the
zig-fmt-pointer-reform-2 branch.
This will convert all & into *. Due to the syntax
ambiguity (which is why we are making this change),
even address-of & will turn into *, so you'll have
to manually fix thes instances. You will be guaranteed
to get compile errors for them - expected 'type', found 'foo'
Diffstat (limited to 'test/cases/enum_with_members.zig')
| -rw-r--r-- | test/cases/enum_with_members.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/cases/enum_with_members.zig b/test/cases/enum_with_members.zig index 8fafa70b02..18174186a9 100644 --- a/test/cases/enum_with_members.zig +++ b/test/cases/enum_with_members.zig @@ -6,7 +6,7 @@ const ET = union(enum) { SINT: i32, UINT: u32, - pub fn print(a: &const ET, buf: []u8) error!usize { + pub fn print(a: *const ET, buf: []u8) error!usize { return switch (a.*) { ET.SINT => |x| fmt.formatIntBuf(buf, x, 10, false, 0), ET.UINT => |x| fmt.formatIntBuf(buf, x, 10, false, 0), |
