summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/identifier-resolution/assign-to-global-undefined-strict.js
blob: 2681bec68c90e77c5609b96d2700c0a0054aa7ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// |reftest| error:ReferenceError
'use strict';
// Copyright (C) 2020 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-initializeboundname
description: >
  In strict mode code, attempts to assign to an unresolvable reference must throw a ReferenceError exception
info: |
  via sec-putvalue

  If IsUnresolvableReference(V) is true, then
    If IsStrictReference(V) is true, then
      Throw a ReferenceError exception.

flags: [onlyStrict]
negative:
  phase: runtime
  type: ReferenceError
---*/

undeclared = (this.undeclared = 5);