Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not mark `in` and `instanceof` as constant
- Loading branch information
1 parent
d6fbba5
commit e4bc031
Showing
5 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
packages/babel-plugin-proposal-class-properties/test/fixtures/regression/15098/exec.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,7 @@ | ||
expect(() => { | ||
class X { [0 in 0]; } | ||
}).toThrow(); | ||
|
||
expect(() => { | ||
class X { [0 instanceof 0]; } | ||
}).toThrow(); |
4 changes: 4 additions & 0 deletions
4
packages/babel-plugin-proposal-class-properties/test/fixtures/regression/15098/input.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,4 @@ | ||
class X { | ||
[ 0 in 0 ]; | ||
[ 0 instanceof 0 ]; | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-plugin-proposal-class-properties/test/fixtures/regression/15098/options.json
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,3 @@ | ||
{ | ||
"plugins": ["proposal-class-properties"] | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/babel-plugin-proposal-class-properties/test/fixtures/regression/15098/output.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,9 @@ | ||
let _ref, _ref2; | ||
_ref = 0 in 0; | ||
_ref2 = 0 instanceof 0; | ||
class X { | ||
constructor() { | ||
babelHelpers.defineProperty(this, _ref, void 0); | ||
babelHelpers.defineProperty(this, _ref2, void 0); | ||
} | ||
} |
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