Repository navigation
fix(struct): 修正 @fieldParentPtr 示例的返回类型 - #419
Merged
Merged
Conversation
- 0.17 与 release 示例中 @fieldParentPtr 的结果类型由 Point 改为 *Point - 新增 base ptr 测试调用 setYBasedOnX,使该函数参与编译检查
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #408
course/code/17/struct.zig与course/code/release/struct.zig中@fieldParentPtr("x", x)的结果类型由Point改为*PointsetYBasedOnX之前没有被任何代码引用,惰性分析不会检查它,因此错误一直未被发现;新增test "base ptr"调用该函数,使其参与编译检查验证:Zig 0.17.1 下修复前新测试报
expected pointer type, found 'struct.BasePtr.Point',修复后zig test通过,根目录zig build通过。