Peter Zhou
Peter Zhou

Reputation: 21

Haxe can implement multi interfaces?

I have the haxe code from AS3HX that converts actionscript3 to haxe. Please see the below:

class Container extends UIComponent implements IContainer implements IDataRenderer implements IFocusManagerContainer implements IListItemRenderer implements IRawChildrenContainer 
{
    public var verticalScrollPolicy(get, set) : String;
    public var creatingContentPane(get, set) : Bool;
    public var clipContent(get, set) : Bool;
    ...
    ...
}

But FlashDevelop always say "You can only implement an interface". I want to know if Haxe can implement multi interfaces?

Thanks.

Upvotes: 1

Views: 147

Answers (1)

tokiop
tokiop

Reputation: 297

Yes, see https://haxe.org/manual/types-interfaces.html

While a class may only have one parent class, it may implement multiple interfaces through multiple implements keywords

Upvotes: 1

Related Questions