v8/test/mjsunit/regress/regress-crbug-980422.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
749 B
JavaScript
Raw Normal View History

// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --enable-lazy-source-positions --stress-lazy-source-positions
(function () {
((d, e = d) => {
return d * e;
})();
})();
try {
(function () {
((d, e = f, f = d) => {
// Won't get here as the initializers will cause a ReferenceError
})();
})();
assertUnreachable();
} catch (ex) {
assertInstanceof(ex, ReferenceError);
// Not using assertThrows because we need to access ex.stack to force
// collection of source positions.
print(ex.stack);
}
// Check that spreads in arrow functions work
(function () {
((...args) => args)();
})();