michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: * Contributor: Jesse Ruderman michael@0: */ michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 521456; michael@0: var summary = michael@0: 'Incorrect decompilation of new (eval(v)).s and new (f.apply(2)).s'; michael@0: printBugNumber(BUGNUMBER); michael@0: printStatus(summary); michael@0: michael@0: function foo(c) { return new (eval(c)).s; } michael@0: function bar(f) { var a = new (f.apply(2).s); return a; } michael@0: michael@0: assertEq(bar.toString().search(/new\s+f/), -1); michael@0: assertEq(foo.toString().search(/new\s+eval/), -1); michael@0: michael@0: reportCompare(true, true);