Commit ac3d9759ed

Exonorid <exonorid@gmail.com>
2022-01-16 18:18:23
Added documentation for implicit struct pointer dereferencing
1 parent 922d33e
Changed files (1)
doc/langref.html.in
@@ -3159,7 +3159,12 @@ test "linked list" {
         .last = &node,
         .len = 1,
     };
+    
+    // When using a pointer to a struct, fields can be accessed directly,
+    // without explicitly dereferencing the pointer.
+    // So you can do
     try expect(list2.first.?.data == 1234);
+    // instead of try expect(list2.first.?.*.data == 1234);
 }
       {#code_end#}