> 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?
Not with current implementation, since Array literal type parameter is not infered. > 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? It will at a very few instructions. Instead of : ... MakeArray Return You'll have : ... MakeArray StoreRegister X Pop GetRegister Ret That's only 3 fast opcodes more, it shouldn't have any significant impact of performances. > Q3: Would Hamtasc behave any differently? I don't think so. I'll put that in my TODO for next MTASC version. Nicolas _______________________________________________ osflash mailing list osflash@osflash.org http://osflash.org/mailman/listinfo/osflash_osflash.org