michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 452498; michael@0: var summary = 'TM: upvar2 regression tests'; michael@0: var actual = ''; michael@0: var expect = ''; michael@0: michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: test(); michael@0: //----------------------------------------------------------------------------- michael@0: michael@0: function test() michael@0: { michael@0: enterFunc ('test'); michael@0: printBugNumber(BUGNUMBER); michael@0: printStatus (summary); michael@0: michael@0: // ------- Comment #135 From Gary Kwong [:nth10sd] michael@0: michael@0: // -j is not required: michael@0: // === michael@0: michael@0: for (let i = 0; i < 9; ++i) { michael@0: let m = i; michael@0: if (i % 3 == 1) { michael@0: print('' + (function() { return m; })()); michael@0: } michael@0: } michael@0: michael@0: // Assertion failure: fp2->fun && fp2->script, at ../jsinterp.cpp:5633 michael@0: // Opt crash [@ js_Interpret] michael@0: // === michael@0: michael@0: try michael@0: { michael@0: (x for each (c in [])) michael@0: x michael@0: } michael@0: catch(ex) michael@0: { michael@0: } michael@0: michael@0: // Assertion failure: ss->printer->pcstack, at ../jsopcode.cpp:909 michael@0: // === michael@0: try michael@0: { michael@0: (function(){for(; (this); ((window for (x in [])) for (y in []))) 0}); michael@0: } michael@0: catch(ex) michael@0: { michael@0: } michael@0: // Assertion failure: level >= tc->staticLevel, at ../jsparse.cpp:5773 michael@0: // === michael@0: eval(uneval( function(){ michael@0: ((function()y)() for each (x in this)) michael@0: } )) michael@0: michael@0: // Debug & opt crash [@ BindNameToSlot] michael@0: michael@0: // -j is required: michael@0: // === michael@0: for (let a=0;a<3;++a) for (let b=0;b<3;++b) if ((g=a|(a%b))) with({}){} michael@0: michael@0: // Assertion failure: OBJ_IS_CLONED_BLOCK(obj), at ../jsobj.cpp:2392 michael@0: michael@0: reportCompare(expect, actual, summary); michael@0: michael@0: exitFunc ('test'); michael@0: }