diff --git a/test/language/module-code/export-default-asyncfunction-declaration-binding-exists.js b/test/language/module-code/export-default-asyncfunction-declaration-binding-exists.js new file mode 100644 index 0000000000..ea726a5841 --- /dev/null +++ b/test/language/module-code/export-default-asyncfunction-declaration-binding-exists.js @@ -0,0 +1,23 @@ +// Copyright (C) 2020 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ExportDeclaration : HoistableDeclaration : AsyncFunctionDeclaration + esid: prod-HoistableDeclaration +info: | + ExportDeclaration : + HoistableDeclaration[Yield, Await, Default]: + + HoistableDeclaration[Yield, Await, Default]: + AsyncFunctionDeclaration[?Yield, ?Await, ?Default] + +flags: [module] +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +class A {}; +export default async function A() {} diff --git a/test/language/module-code/export-default-asyncfunction-declaration-binding.js b/test/language/module-code/export-default-asyncfunction-declaration-binding.js new file mode 100644 index 0000000000..dbf266a2ce --- /dev/null +++ b/test/language/module-code/export-default-asyncfunction-declaration-binding.js @@ -0,0 +1,18 @@ +// Copyright (C) 2020 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ExportDeclaration : HoistableDeclaration : AsyncFunctionDeclaration + esid: prod-HoistableDeclaration +info: | + ExportDeclaration : + HoistableDeclaration[Yield, Await, Default]: + + HoistableDeclaration[Yield, Await, Default]: + AsyncFunctionDeclaration[?Yield, ?Await, ?Default] + +flags: [module] +---*/ + +export default async function A() {} +A.foo = ''; diff --git a/test/language/module-code/export-default-asyncgenerator-declaration-binding-exists.js b/test/language/module-code/export-default-asyncgenerator-declaration-binding-exists.js new file mode 100644 index 0000000000..9a0d71b6bd --- /dev/null +++ b/test/language/module-code/export-default-asyncgenerator-declaration-binding-exists.js @@ -0,0 +1,23 @@ +// Copyright (C) 2020 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ExportDeclaration : HoistableDeclaration : AsyncGeneratorDeclaration + esid: prod-HoistableDeclaration +info: | + ExportDeclaration : + HoistableDeclaration[Yield, Await, Default]: + + HoistableDeclaration[Yield, Await, Default]: + AsyncGeneratorDeclaration[?Yield, ?Await, ?Default] + +flags: [module] +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +class AG {} +export default async function * AG() {} diff --git a/test/language/module-code/export-default-asyncgenerator-declaration-binding.js b/test/language/module-code/export-default-asyncgenerator-declaration-binding.js new file mode 100644 index 0000000000..d0b31d4f39 --- /dev/null +++ b/test/language/module-code/export-default-asyncgenerator-declaration-binding.js @@ -0,0 +1,18 @@ +// Copyright (C) 2020 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ExportDeclaration : HoistableDeclaration : AsyncGeneratorDeclaration + esid: prod-HoistableDeclaration +info: | + ExportDeclaration : + HoistableDeclaration[Yield, Await, Default]: + + HoistableDeclaration[Yield, Await, Default]: + AsyncGeneratorDeclaration[?Yield, ?Await, ?Default] + +flags: [module] +---*/ + +export default async function * AG() {} +AG.foo = ''; diff --git a/test/language/module-code/export-default-function-declaration-binding-exists.js b/test/language/module-code/export-default-function-declaration-binding-exists.js new file mode 100644 index 0000000000..cc97904bc8 --- /dev/null +++ b/test/language/module-code/export-default-function-declaration-binding-exists.js @@ -0,0 +1,24 @@ +// Copyright (C) 2020 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ExportDeclaration : HoistableDeclaration : FunctionDeclaration + esid: prod-HoistableDeclaration +info: | + ExportDeclaration : + HoistableDeclaration[Yield, Await, Default]: + + HoistableDeclaration[Yield, Await, Default]: + FunctionDeclaration[?Yield, ?Await, ?Default] + +flags: [module] +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +class F {} +export default function F() {} + diff --git a/test/language/module-code/export-default-function-declaration-binding.js b/test/language/module-code/export-default-function-declaration-binding.js new file mode 100644 index 0000000000..a5bce67dd5 --- /dev/null +++ b/test/language/module-code/export-default-function-declaration-binding.js @@ -0,0 +1,18 @@ +// Copyright (C) 2020 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ExportDeclaration : HoistableDeclaration : FunctionDeclaration + esid: prod-HoistableDeclaration +info: | + ExportDeclaration : + HoistableDeclaration[Yield, Await, Default]: + + HoistableDeclaration[Yield, Await, Default]: + FunctionDeclaration[?Yield, ?Await, ?Default] + +flags: [module] +---*/ + +export default function F() {} +F.foo = ''; diff --git a/test/language/module-code/export-default-generator-declaration-binding-exists.js b/test/language/module-code/export-default-generator-declaration-binding-exists.js new file mode 100644 index 0000000000..5c21bd73b2 --- /dev/null +++ b/test/language/module-code/export-default-generator-declaration-binding-exists.js @@ -0,0 +1,23 @@ +// Copyright (C) 2020 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ExportDeclaration : HoistableDeclaration : GeneratorDeclaration + esid: prod-HoistableDeclaration +info: | + ExportDeclaration : + HoistableDeclaration[Yield, Await, Default]: + + HoistableDeclaration[Yield, Await, Default]: + GeneratorDeclaration[?Yield, ?Await, ?Default] + +flags: [module] +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +class G {} +export default function * G() {} diff --git a/test/language/module-code/export-default-generator-declaration-binding.js b/test/language/module-code/export-default-generator-declaration-binding.js new file mode 100644 index 0000000000..37fbffa232 --- /dev/null +++ b/test/language/module-code/export-default-generator-declaration-binding.js @@ -0,0 +1,18 @@ +// Copyright (C) 2020 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ExportDeclaration : HoistableDeclaration : GeneratorDeclaration + esid: prod-HoistableDeclaration +info: | + ExportDeclaration : + HoistableDeclaration[Yield, Await, Default]: + + HoistableDeclaration[Yield, Await, Default]: + GeneratorDeclaration[?Yield, ?Await, ?Default] + +flags: [module] +---*/ + +export default function * G() {} +G.foo = '';