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

#write test.zig {
const Foo = struct {
    ptr: ?*usize,
    uval: u32,
};
fn get_uval(x: u32) !u32 {
    _ = x;
    return error.NotFound;
}
export fn entry() void {
    const afoo = Foo{
        .ptr = null,
        .uval = get_uval(42),
    };
    _ = afoo;
}
#}
#update
#check errors {
test.zig:12:15: error: expected type 'u32', found '@typeInfo(@typeInfo(@TypeOf(test.get_uval)).@"fn".return_type.?).error_union.error_set!u32'
test.zig:12:15: note: cannot convert error union to payload type
test.zig:12:15: note: consider using 'try', 'catch', or 'if'
#}
