v/vlib/v/checker/tests/comptime_field_selector_not...

15 lines
131 B
V

struct Foo {
test int
name string
}
fn test<T>() {
mut t := T{}
name := 'test'
t.$(name) = '3'
}
fn main() {
test<Foo>()
}