Debian Codegraph @

js/src/tests/test262/annexB/language/expressions/logical-and/emulates-undefined.js

raw
1 // Copyright (C) 2020 Alexey Shvayka. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-binary-logical-operators-runtime-semantics-evaluation
5 description: >
6 ToBoolean returns `false` for [[IsHTMLDDA]] object; rval is not evaluated.
7 info: |
8 LogicalANDExpression : LogicalANDExpression && BitwiseORExpression
9
10 1. Let lref be the result of evaluating LogicalANDExpression.
11 2. Let lval be ? GetValue(lref).
12 3. Let lbool be ! ToBoolean(lval).
13 4. If lbool is false, return lval.
14
15 The [[IsHTMLDDA]] Internal Slot / Changes to ToBoolean
16
17 1. If argument has an [[IsHTMLDDA]] internal slot, return false.
18 2. Return true.
19 features: [IsHTMLDDA]
20 ---*/
21
22 var IsHTMLDDA = $262.IsHTMLDDA;
23
24 assert.sameValue(IsHTMLDDA && unresolved, IsHTMLDDA);
25
26 reportCompare(0, 0);