I have a struct that uses std ArrayListUnmanaged like so:
const Bar = struct {
cols: ds.ArrayListUnmanaged(*Foo)
fn init() @This() {
return @This() {.cols = ds.ArrayListUnmanaged(*Foo).init()};
}
}
// ds.ArrayListUnmanaged(*Foo).init() is simply:
fn init() @This() {
return @This() {.list = std.ArrayListUnmanaged(T){}};
}
calling Bar.init() results in an error:
expected type ds.ArrayListUnmanaged(*foo.Foo), found ds.ArrayListUnmanaged(*foo.Foo), which doesn't really make sense.
However, aliasing ds.ArrayListUnmanaged(*Foo) resolves the issue (i.e. const Thing = ds.ArrayListUnmanaged(*Foo)).
Any ideas?