Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ExportDeclaration : HoistableDeclaration; Fixes gh-2068
- Loading branch information
Showing
8 changed files
with
165 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
test/language/module-code/export-default-asyncfunction-declaration-binding-exists.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
18 changes: 18 additions & 0 deletions
18
test/language/module-code/export-default-asyncfunction-declaration-binding.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = ''; |
23 changes: 23 additions & 0 deletions
23
test/language/module-code/export-default-asyncgenerator-declaration-binding-exists.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
18 changes: 18 additions & 0 deletions
18
test/language/module-code/export-default-asyncgenerator-declaration-binding.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = ''; |
24 changes: 24 additions & 0 deletions
24
test/language/module-code/export-default-function-declaration-binding-exists.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} | ||
|
18 changes: 18 additions & 0 deletions
18
test/language/module-code/export-default-function-declaration-binding.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = ''; |
23 changes: 23 additions & 0 deletions
23
test/language/module-code/export-default-generator-declaration-binding-exists.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
18 changes: 18 additions & 0 deletions
18
test/language/module-code/export-default-generator-declaration-binding.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = ''; |