Imaginary code: class Foo { } class Baa { Foo a = new Foo(); Foo b = new Foo(); Foo[] l = [a,b]; }
What should I use instead of to it work? Array!Foo(a,b) didn't worked either.
I know this works: class Baa { Foo a = new Foo(); Foo b = new Foo(); Foo[] l; this() { l = [a,b]; } But I'd like to initializa it at declaration time