AS3: How can I require a method argument to implement multiple interfaces?
- by Anders
The argument to my method func() must implement the two unrelated interfaces IFoo and IBar. Is there a better way of doing this than declaring another interface only for this purpose that inherits from IFoo and IBar and using that interface as the argument type?
public interface IFooBar implements IFoo, IBar {
}
public function func(arg:IFooBar):void {
}
I'm developing for Flash Player 9.