AS3: How can I require a method argument to implement multiple interfaces?

Posted by Anders on Stack Overflow See other posts from Stack Overflow or by Anders
Published on 2010-05-04T07:34:57Z Indexed on 2010/05/04 7:38 UTC
Read the original article Hit count: 207

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.

© Stack Overflow or respective owner

Related posts about actionscript-3

Related posts about argument