[haXe] cast doesn't work

picnic bitvolt at gmail.com
Tue Dec 4 23:58:51 CET 2007


hi
I'm doing something the wrong way:


1.)
var n: Int = cast("7",Int);

--> Uncaught exception - Class cast error


I have to do it that way to make it work:

2.)
var n : String = "7";
var tmp : Dynamic = n;	
n = tmp;


what is wrong in 1.) ?

thanks
ben



More information about the Haxe mailing list