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