summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/typeof/unresolvable-reference.js
blob: 40a7a5c2314b571db611bef481869ae0ace93f95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-typeof-operator-runtime-semantics-evaluation
description: If IsUnresolvableReference(val) is true, return "undefined".
info: |
  The typeof Operator

  Runtime Semantics: Evaluation

    ...
    If Type(val) is Reference, then
      If IsUnresolvableReference(val) is true, return "undefined".
    ...

---*/

assert.sameValue(
  typeof x,
  "undefined",
  "typeof x === 'undefined'"
);

reportCompare(0, 0);