zig/test/cases/try_in_comptime_in_struct_in_test.zig

14 lines
228 B
Zig

test "@unionInit on union w/ tag but no fields" {
const S = struct {
comptime {
try expect(false);
}
};
_ = S;
}
// error
// is_test=true
//
// :4:13: error: 'try' outside function scope