Executing following code : ---------------------------------------------------------- let testCases = [ function(){return 1;}, function(){return 2} ]; let passed = true; const isFloatTest = true; function makeArray(size = 10){ } function makeSource(size = 10) { } for(let testCase of testCases) { let results = []; let testInfo = testCase(); let src; if(!testInfo.makeSource) { src = makeSource(testInfo.end - testInfo.start); } function run(gen) { if(testInfo.makeSource) { src = testInfo.makeSource(); } } run(makeArray); } if(passed) { print("PASSED"); } else { print("FAILED"); } print("BT_FLAG"); ------------------------------------------------------- The output(ChakraCore, V8, SpiderMonkey) should be : PASSED BT_FLAG However, JavaScriptCore throws a Reference Error: Exception: ReferenceError: Can't find variable: testInfo BT_GROUP 2018/8/21
*** This bug has been marked as a duplicate of bug 187945 ***