authorgravatar for exonorid@gmail.comExonorid <exonorid@gmail.com> 2022-01-16 10:18:23-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-02-02 21:53:00-07:00
logac3d9759ed6d28bb2fcb6f6f596e28ae5dae8969
treea7ab051300fd86d9bc8e3fc6001ad8cff1daa413
parent922d33e5b9195587afa4e97cd60c0af0212938bd

Added documentation for implicit struct pointer dereferencing


1 files changed, 5 insertions(+), 0 deletions(-)

doc/langref.html.in+5
......@@ -3159,7 +3159,12 @@ test "linked list" {
31593159 .last = &node,
31603160 .len = 1,
31613161 };
3162
3163 // When using a pointer to a struct, fields can be accessed directly,
3164 // without explicitly dereferencing the pointer.
3165 // So you can do
31623166 try expect(list2.first.?.data == 1234);
3167 // instead of try expect(list2.first.?.*.data == 1234);
31633168}
31643169 {#code_end#}
31653170