mirror of
https://github.com/tc39/test262.git
synced 2025-10-16 05:19:07 +02:00
In order to facilitate proper tail calls, ES2015 modified the completion value of a number of statements. These tests use `eval` to verify the new values.
16 lines
506 B
JavaScript
16 lines
506 B
JavaScript
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
/*---
|
|
es6id: 13.6.7
|
|
description: Completion value when expression is false without an `else` clause
|
|
info: >
|
|
IfStatement : if ( Expression ) Statement
|
|
|
|
[...]
|
|
4. If exprValue is false, then
|
|
a. Return NormalCompletion(undefined).
|
|
---*/
|
|
|
|
assert.sameValue(eval('1; if (false) { }'), undefined);
|
|
assert.sameValue(eval('2; if (false) { 3; }'), undefined);
|