I have the below function. When I use "return [v,ix];" then "mtasc
-strict" complains with:
type error Array should be #Number.Array
When I change to define a return variable it is happy.
Q1: Is there a way to avoid having to define a return variable?
Q2: If not, does defining a return variable have any effect on the size
of the generated code, or does it get optimized away by the compiler?
Q3: Would Hamtasc behave any differently?
Thanks,
Darren
---------------------------------------------------
public static function foo(...): /*Number*/Array {
var v:Number=Number.MAX_VALUE;
var ix:Number;
...
//return [v,ix];
var r:/*Number*/Array=[v,ix];
return r;
}
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org