mirror of https://github.com/tc39/test262.git
23 lines
448 B
JavaScript
23 lines
448 B
JavaScript
|
// Copyright (C) 2015 the V8 project authors. All rights reserved.
|
||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||
|
/*---
|
||
|
es6id: 13.3.3.7
|
||
|
description: >
|
||
|
Return abrupt from a property value as a default argument.
|
||
|
---*/
|
||
|
|
||
|
var obj = {};
|
||
|
Object.defineProperty(obj, 'err', {
|
||
|
get: function() {
|
||
|
throw new Test262Error();
|
||
|
}
|
||
|
});
|
||
|
|
||
|
function fn(a = obj.err) {
|
||
|
return 42;
|
||
|
}
|
||
|
|
||
|
assert.throws(Test262Error, function() {
|
||
|
fn();
|
||
|
});
|