Skip to content

Error: no field named 'Enum' in union 'builtin.Type' #7

Closed
@Tomcat-42

Description

@Tomcat-42

This code is only reached when testing a module that imports zopengl (using std.testing.refAllDeclsRecursive). That might explain why no one encountered this issue before.

test
└─ run test
   └─ zig test Debug native 1 errors
/home/pablo/.cache/zig/p/12207c2edb1c0a8150b60eca8be0f9c7837d565846f13d58c8069879c9735182a84b/src/wrapper.zig:9:46: error: no field named 'Enum' in union 'builtin.Type'
        const tag_type = @typeInfo(Enums[0]).Enum.tag_type;
                                             ^~~~
/home/pablo/.zvm/master/lib/std/builtin.zig:557:18: note: union declared here
pub const Type = union(enum) {
                 ^~~~~
/home/pablo/.cache/zig/p/12207c2edb1c0a8150b60eca8be0f9c7837d565846f13d58c8069879c9735182a84b/src/wrapper.zig:133:46: note: called from here
        pub const ParamName = meta.mergeEnums(.{
                              ~~~~~~~~~~~~~~~^

Nevertheless, reflection on enums syntax changed to std.buildtin.Type.@"enum", so it should be a small fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions