v/vlib/v/checker/tests/struct_required_fn_field.vv

17 lines
163 B
V

struct Abc {
f1 int [required]
f2 int
f3 fn () [attr1; required; attr2]
}
fn main() {
_ = Abc{
f1: 123
f3: fn () {}
}
_ = Abc{
f1: 123
f2: 789
}
}