tests/auto/qml/ecmascripttests/test262/test/language/expressions/object/setter-body-strict-outside.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 | es5id: 11.1.5_7-2-1-s |
| 5 | description: > |
| 6 | Strict Mode - SyntaxError is thrown when an assignment to a |
| 7 | reserved word is contained in strict code |
| 8 | negative: |
| 9 | type: SyntaxError |
| 10 | phase: parse |
| 11 | flags: [onlyStrict] |
| 12 | ---*/ |
| 13 | |
| 14 | throw "Test262: This statement should not be evaluated."; |
| 15 | |
| 16 | void { |
| 17 | set x(value) { |
| 18 | public = 42; |
| 19 | } |
| 20 | }; |