Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bind calls involving conditional and logical expressions
- Loading branch information
1 parent
4d1f946
commit 80dff0f
Showing
5 changed files
with
59 additions
and
9 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
8 changes: 8 additions & 0 deletions
8
test/function/samples/associate-parameter-mutations-across-other-expressions/_config.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,8 @@ | ||
var assert = require( 'assert' ); | ||
|
||
module.exports = { | ||
description: 'Associates parameters with their call arguments across other expressions', | ||
exports: function ( exports ) { | ||
assert.equal( exports.bar, 'present' ); | ||
} | ||
}; |
11 changes: 11 additions & 0 deletions
11
test/function/samples/associate-parameter-mutations-across-other-expressions/main.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,11 @@ | ||
const foo = { mightBeExported: {} }; | ||
const exported = {}; | ||
|
||
function assignExported ( obj ) { | ||
obj.mightBeExported = exported; | ||
} | ||
|
||
(Math.random() < 0.5 ? true && assignExported : false || assignExported)( foo ); | ||
foo.mightBeExported.bar = 'present'; | ||
|
||
export default exported; |