Debian Codegraph @

js/src/tests/test262/language/directive-prologue/set-accsr-runtime.js

raw
1 // Copyright (c) 2012 Ecma International. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: use-strict-directive
6 es5id: 10.1.1-25-s
7 description: >
8 Strict Mode - Function code of Accessor PropertyAssignment
9 contains Use Strict Directive which appears at the start of the
10 block(getter)
11 flags: [noStrict]
12 ---*/
13
14
15 assert.throws(ReferenceError, function() {
16 var obj = {};
17 Object.defineProperty(obj, "accProperty", {
18 set: function () {
19 "use strict";
20 test262unresolvable = null;
21 return 11;
22 }
23 });
24 obj.accProperty = "overrideData";
25 });
26
27 reportCompare(0, 0);