blob: 8cb007e4596fa4ed2e7f6dab3f7e2c9f413fdf6b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Copyright 2019 Google, Inc. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-OptionalExpression
description: >
ternary operation with decimal does not evaluate as optional chain
info: |
Punctuators
OptionalChainingPunctuator::
?.[lookahead ∉ DecimalDigit]
features: [optional-chaining]
---*/
const value = true ?.30 : false;
assert.sameValue(.30, value);
|