Unable to access an array element in 0.16.0

While upgrading my code to 0.16.0 I ran into this odd issue:

        pub fn handleLoop(ed: *ExecuteData, _: *Value) void {
            @compileLog(@TypeOf(ed.func.*.internal_function.reserved));
            const ptr = ed.func.*.internal_function.reserved[0];
            @compileLog(@TypeOf(ptr));
Compile Log Output:
@as(type, [6]?*anyopaque)
@as(type, [6]?*anyopaque)

Is this a bug or am I missing something?

I’m guessing func is a [*c] pointer? If yes, this is https://codeberg.org/ziglang/zig/issues/31888 (fixed on master, but unfortunately present in 0.16.0).
A workaround would be to cast func to a regular single-item * pointer first before dereferencing it when indexing into reserved (or just using a single-item instead of a c pointer for the ExecuteData.func field, which is probably a good idea anyway as c pointers should really only be used in code that’s been mechanically translated from c).

If you provide an example we can run, we wouldn’t have to reconstruct your types.