Let's say I have the following interface and implementor :
public interface ICar
function get parts() : Vector.<DisplayObject>;
public class Car implements ICar
public var parts : Vector.<DisplayObject>;
This works perfectly for any type other than vector. As you know, the compiler will generate the getter/setter from the default Bindable tag and the class members will successfully match the interface. I could declare a getter and a setter in the implementor but I like to keep my code simple and short and thus want to keep using this approach for simple cases.
When using vector.<anything> though, I either get a "the class does not implement the interface correctly" or just a generated code error.
It seems the generated getter/setter is using the wrong type ( * instead of Vector in that case ):
public function get parts():*
is that a known issue ?
Is this with the Flex 4 compiler?
Good point, forgot to precise...
That particular project is flex SDK 3.5 / Flash 10.0.0 and Flash builder 4. So I guess the compiler is the version 4 ?
Each SDK has its own compiler. Can you try it in a Flex 4 project?
It does work with the SDK 4.0 and 4.1 yes.