SpookyFM / hscript

Automatically exported from code.google.com/p/hscript
0 stars 0 forks source link

cpp target empty string may be treated as number #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
    class Test {

        static function main():Void {
            var parser = new hscript.Parser();
            var program = parser.parseString("var a = ''; a += 1; a += 1; a;");
            trace( new hscript.Interp().execute(program) ); //neko output "11" which is right, but cpp output 2.
        }
    }

Original issue reported on code.google.com by Andy.onthewings on 16 May 2011 at 2:27

GoogleCodeExporter commented 9 years ago
Could reproduce, no fix yet.

Might be a bug in cpp, because it works fine on flash9+ which have some native 
Int type as well.

Original comment by ncanna...@gmail.com on 1 Aug 2011 at 4:59