#zig build-obj {
--name test -fno-emit-bin
-Mroot=test.zig
#}

#write test.zig {
const Struct = struct {
    a: u32,
};
fn getIndex() usize {
    return 2;
}
export fn entry() void {
    const index = getIndex();
    const field = @typeInfo(Struct).@"struct".field_types[index];
    _ = field;
}
#}
#update
#check errors {
test.zig:9:59: error: values of type 'type' must be comptime-known, but index value is runtime-known
test.zig:9:58: note: types are not available at runtime
#}
