as3hx icon indicating copy to clipboard operation
as3hx copied to clipboard

Wrong conversion `break label;`

Open SlavaRa opened this issue 8 years ago • 0 comments
trafficstars

as3 code for example:

package {
    public class Issue313 {
        public function Issue313() {
            loop: for(var i:int = 0; i < 10; i++) {
                for(var j:int = 0; j < 10; j++) {
                    break loop;
                }
            }
        }
    }
}

expected result


class Issue313
{
    public function new()
    {
        try
        {
            for(i in 0...10)
            {
                for(j in 0...10)
                {
                    throw new as3hx.Compat.BreakLabel("break loop");
                }
            }
        } catch(e:as3hx.Compat.BreakLabel) {}
    }
}

SlavaRa avatar Nov 15 '17 18:11 SlavaRa