Thiago Sabin
Thiago Sabin

Reputation: 137

Haxe as syntax, how to use AS3 as

I have this line in AS3 and did not find a proper cast to use.

var ok:LoginOk = msg as LoginOk;

Can someone tell me how to do that in Haxe, LoginOk extends msg.

Upvotes: 2

Views: 96

Answers (1)

Gama11
Gama11

Reputation: 34128

You can use an unsafe cast:

var ok:LoginOk = cast msg;

Upvotes: 3

Related Questions