Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support @typeInfo for 0.14.0 #91

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

lateefj
Copy link

@lateefj lateefj commented Oct 1, 2024

The @typeInfo syntax has change for switch statements.

@FObersteiner
Copy link
Collaborator

FObersteiner commented Oct 8, 2024

Looks good to me; however note that this would introduce an incompatibility with Zig 0.13.

@hendriknielaender
Copy link
Owner

As soon as 0.14 gets released, we will get this into main 👍 @lateefj thank you.

@lateefj
Copy link
Author

lateefj commented Oct 8, 2024

I found another compile error in examples with latest 0.14. I will just accumulate changes on this branch until release happens.

@lateefj
Copy link
Author

lateefj commented Oct 11, 2024

Only outstanding is related to TypeOf(anytype):

└─ zig build-exe parameterised Debug native 1 errors
zbench.zig:154:14: error: no field named 'Pointer' in enum '@typeInfo(builtin.Type).@"union".tag_type.?'
            .Pointer => |ptr| if (ptr.is_const) ptr.child else @compileError(
            ~^~~~~~~```

@FObersteiner
Copy link
Collaborator

IIRC, types all got lower-cased for consistency; so it should be .pointer.

zbench.zig Outdated Show resolved Hide resolved
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.

4 participants