Skip to content

Conversation

@kioz-wang
Copy link
Owner

No description provided.

关于 `@field(lhs: anytype, comptime field_name: []const u8)` 获取 method 的问题:
- 考虑到 zig 中的 method 实际为函数调用的语法糖,所以 object 中并没有相关 field,因此 `@field(obj, methodName)` 将会失败。正确的做法是使用 `@field(Cls, methodName)`,并手动传入参数 `obj`
@kioz-wang kioz-wang linked an issue Jul 25, 2025 that may be closed by this pull request
@kioz-wang kioz-wang self-assigned this Jul 25, 2025
@kioz-wang kioz-wang added this to the release v0.14.8 milestone Jul 25, 2025
@kioz-wang kioz-wang merged commit 0c6f687 into main Jul 25, 2025
5 checks passed
@kioz-wang kioz-wang deleted the feature/refact_format_usage_and_help branch July 25, 2025 07:21
@kioz-wang kioz-wang linked an issue Jul 25, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

重构usage和help格式化实现 版本号规则应该调整成更易理解的形式

2 participants