mirror of https://github.com/tc39/test262.git
Re-resolve unresolvable references on the global in PutValue. Supports tc39/ecma262#2205
This commit is contained in:
parent
20b11bee0f
commit
4caf66a5cc
|
@ -3,18 +3,18 @@
|
||||||
/*---
|
/*---
|
||||||
esid: sec-initializeboundname
|
esid: sec-initializeboundname
|
||||||
description: >
|
description: >
|
||||||
In strict mode code, attempts to assign to an unresolvable reference must throw a ReferenceError exception
|
In strict mode code, re-resolve unresolvable references on the global in PutValue.
|
||||||
info: |
|
info: |
|
||||||
via sec-putvalue
|
via sec-putvalue
|
||||||
|
|
||||||
If IsUnresolvableReference(V) is true, then
|
If IsUnresolvableReference(V) is true, then
|
||||||
If IsStrictReference(V) is true, then
|
If IsStrictReference(V) is true, then
|
||||||
Throw a ReferenceError exception.
|
Let realm be the current Realm Record.
|
||||||
|
Set V to ? ResolveBinding(realm.[[GlobalEnv]], name).
|
||||||
|
Assert: IsStrictReference(V) is true.
|
||||||
|
If IsUnresolvableReference(V) is true, throw a ReferenceError exception.
|
||||||
|
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
negative:
|
|
||||||
phase: runtime
|
|
||||||
type: ReferenceError
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
undeclared = (this.undeclared = 5);
|
undeclared = (this.undeclared = 5);
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
// 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, re-resolve unresolvable references on the global in PutValue.
|
||||||
|
info: |
|
||||||
|
via sec-putvalue
|
||||||
|
|
||||||
|
If IsUnresolvableReference(V) is true, then
|
||||||
|
If IsStrictReference(V) is true, then
|
||||||
|
Let realm be the current Realm Record.
|
||||||
|
Set V to ? ResolveBinding(realm.[[GlobalEnv]], name).
|
||||||
|
Assert: IsStrictReference(V) is true.
|
||||||
|
If IsUnresolvableReference(V) is true, throw a ReferenceError exception.
|
||||||
|
|
||||||
|
flags: [onlyStrict]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
undeclared = (globalThis.undeclared = 5);
|
Loading…
Reference in New Issue