diff options
Diffstat (limited to 'js/src/tests/test262/language/module-code/eval-export-dflt-expr-in.js')
-rw-r--r-- | js/src/tests/test262/language/module-code/eval-export-dflt-expr-in.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/module-code/eval-export-dflt-expr-in.js b/js/src/tests/test262/language/module-code/eval-export-dflt-expr-in.js new file mode 100644 index 0000000000..26aaa3854c --- /dev/null +++ b/js/src/tests/test262/language/module-code/eval-export-dflt-expr-in.js @@ -0,0 +1,30 @@ +// |reftest| module +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + The `in` operator may occur within an exported AssignmentExpression +esid: sec-moduleevaluation +info: | + [...] + 16. Let result be the result of evaluating module.[[ECMAScriptCode]]. + [...] + + 15.2.3 Exports + + Syntax + + ExportDeclaration : + + export default [lookahead ∉ { function, class }] AssignmentExpression[In]; +flags: [module] +---*/ + +var x = { x: true }; + +export default 'x' in x; +import f from './eval-export-dflt-expr-in.js'; + +assert.sameValue(f, true); + +reportCompare(0, 0); |