summaryrefslogtreecommitdiff
path: root/js/src/tests/test262/language/optional-chaining/punctuator-decimal-lookahead.js
blob: ec64f9201ed7078196f2a10f45fae50b5c001b72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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);

reportCompare(0, 0);