-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement export * as ns from module syntax
Also fix #5777 And minor syntax error message improvement
- Loading branch information
Showing
10 changed files
with
445 additions
and
218 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. | ||
//------------------------------------------------------------------------------------------------------- | ||
|
||
// Bug Issue 5777 https://github.com/Microsoft/ChakraCore/issues/5777 | ||
// Duplicate export names should cause an early syntax error | ||
|
||
WScript.RegisterModuleSource("a.js", | ||
`export const boo = 4; | ||
export {bar as boo} from "b.js"; | ||
print ("Should not be printed")`); | ||
WScript.RegisterModuleSource("b.js","export const bar = 5;"); | ||
|
||
import("a.js").then(()=>{ | ||
print("Failed - expected SyntaxError but no error thrown") | ||
}).catch ((e)=>{ | ||
if (e instanceof SyntaxError) { | ||
print("pass"); | ||
} else { | ||
print (`Failed - threw ${e.constructor.toString()} but should have thrown SyntaxError`); | ||
} | ||
}); |
Oops, something went wrong.