summaryrefslogtreecommitdiff
path: root/test/language/expressions/optional-chaining/punctuator-decimal-lookahead.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/language/expressions/optional-chaining/punctuator-decimal-lookahead.js')
-rw-r--r--test/language/expressions/optional-chaining/punctuator-decimal-lookahead.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/language/expressions/optional-chaining/punctuator-decimal-lookahead.js b/test/language/expressions/optional-chaining/punctuator-decimal-lookahead.js
new file mode 100644
index 000000000..8cb007e45
--- /dev/null
+++ b/test/language/expressions/optional-chaining/punctuator-decimal-lookahead.js
@@ -0,0 +1,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);