blob: 93ea619afab36af810e98a1343196a28564cba05 [file] [log] [blame]
// 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)();
})();