diff options
Diffstat (limited to 'js/src/tests/test262/language/expressions/coalesce/cannot-chain-tail-with-logical-and.js')
-rw-r--r-- | js/src/tests/test262/language/expressions/coalesce/cannot-chain-tail-with-logical-and.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/expressions/coalesce/cannot-chain-tail-with-logical-and.js b/js/src/tests/test262/language/expressions/coalesce/cannot-chain-tail-with-logical-and.js new file mode 100644 index 0000000000..a85faef116 --- /dev/null +++ b/js/src/tests/test262/language/expressions/coalesce/cannot-chain-tail-with-logical-and.js @@ -0,0 +1,31 @@ +// |reftest| error:SyntaxError +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: > + If the CoalesceExpressionHead is undefined or null, follow return the right-side value. + Otherwise, return the left-side value. +esid: sec-conditional-operator +info: | + ConditionalExpression : + ShortCircuitExpression + ShortCircuitExpression ? AssignmentExpression : AssignmentExpression + + ShortCircuitExpression : + LogicalORExpression + CoalesceExpression + + CoalesceExpression : + CoalesceExpressionHead ?? BitwiseORExpression + + CoalesceExpressionHead : + CoalesceExpression + BitwiseORExpression +features: [coalesce-expression] +negative: + phase: early + type: SyntaxError +---*/ + +0 ?? 0 && true;
\ No newline at end of file |