Skip to content

Commit 184aebc

Browse files
weliujinzhongjia
authored andcommitted
Fix the return type of @fieldParentPtr
1 parent 97d378f commit 184aebc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

course/code/15/struct.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ const BasePtr = struct {
329329
};
330330

331331
fn setYBasedOnX(x: *f32, y: f32) void {
332-
const point: Point = @fieldParentPtr("x", x);
332+
const point: *Point = @fieldParentPtr("x", x);
333333
point.y = y;
334334
}
335335
// #endregion base_ptr

0 commit comments

Comments
 (0)