aba932aefa
* Commonjs module:create synthetic exports symbol Previously, the `module` identifier in commonjs modules got a synthetic type with a single property `exports`. The exports property reused the file's symbol, which, for a module file, gives the correct exported properties. However, the name of this symbol was still the filename of the file, not `exports`. This PR creates a synthetic symbol for `exports` by copying in a similar way to esModuleInterop's `default` symbol in `resolveESModuleSymbol` (although the intent there is to strip off signatures from the symbol). * correct parent of synthetic symbol
22 lines
828 B
Plaintext
22 lines
828 B
Plaintext
=== tests/cases/conformance/salsa/Eloquent.js ===
|
|
// bug #27365, crashes from github.com/marijnh/Eloquent-JavaScript
|
|
(function() {
|
|
exports.bigOak = 1
|
|
>exports.bigOak : Symbol(bigOak, Decl(Eloquent.js, 1, 13))
|
|
>exports : Symbol(bigOak, Decl(Eloquent.js, 1, 13))
|
|
>bigOak : Symbol(bigOak, Decl(Eloquent.js, 1, 13))
|
|
|
|
exports.everywhere = 2
|
|
>exports.everywhere : Symbol(everywhere, Decl(Eloquent.js, 2, 18))
|
|
>exports : Symbol(everywhere, Decl(Eloquent.js, 2, 18))
|
|
>everywhere : Symbol(everywhere, Decl(Eloquent.js, 2, 18))
|
|
|
|
module.exports = exports
|
|
>module.exports : Symbol(module.exports, Decl(Eloquent.js, 0, 0))
|
|
>module : Symbol(export=, Decl(Eloquent.js, 3, 22))
|
|
>exports : Symbol(export=, Decl(Eloquent.js, 3, 22))
|
|
>exports : Symbol("tests/cases/conformance/salsa/Eloquent", Decl(Eloquent.js, 0, 0))
|
|
|
|
})()
|
|
|