i have a generic function that returns a struct
, which in turn implements an init(...)
method… typical use looks like this:
var foo = GenType(u8).init(...);
var bar = GenType(bool).init(...);
if i define my own struct
with fields (not decls), i find i have to repeat the type expression on both sides of the =
struct {
foo: GenType(u8) = GenType(u8).init(...),
bar: GenType(bool) = GenType(bool).init(...),
}
is there a more concise way of saying this???