File tree Expand file tree Collapse file tree 3 files changed +77
-8
lines changed
babel-helper-define-polyfill-provider/src/visitors
babel-plugin-polyfill-corejs3/test/fixtures/usage-pure/dead-branch Expand file tree Collapse file tree 3 files changed +77
-8
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ export default (
1313
1414 const polyfilled = new WeakSet ( ) ;
1515 function maybeMark ( path : NodePath , oldNode : t . Node ) {
16- if ( path . node !== oldNode ) {
16+ // Avoid Instance Properties
17+ if ( path . node !== oldNode && ! path . isCallExpression ( ) ) {
1718 polyfilled . add ( path . node ) ;
1819 }
1920 }
Original file line number Diff line number Diff line change 1- String . prototype . padStart || err ;
2- ! String . prototype . padStart || ok ;
1+ Reflect . construct || err ;
2+ ! Reflect . construct || ok ;
33
44
5- String . prototype . padStart ? ok : err ;
6- ! String . prototype . padStart ? err : ok ;
5+ Reflect . construct ? ok : err ;
6+ ! Reflect . construct ? err : ok ;
77
8- if ( String . prototype . padStart ) {
8+ if ( Reflect . construct ) {
99 ok ;
1010} else {
1111 err ;
1212}
13- if ( ! String . prototype . padStart ) {
13+ if ( ! Reflect . construct ) {
14+ err ;
15+ } else {
16+ ok ;
17+ }
18+
19+
20+ Symbol . dispose || err ;
21+ ! Symbol . dispose || ok ;
22+
23+
24+ Symbol . dispose ? ok : err ;
25+ ! Symbol . dispose ? err : ok ;
26+
27+ if ( Symbol . dispose ) {
28+ ok ;
29+ } else {
30+ err ;
31+ }
32+ if ( ! Symbol . dispose ) {
33+ err ;
34+ } else {
35+ ok ;
36+ }
37+
38+
39+ a . padStart || err ;
40+ ! a . padStart || ok ;
41+
42+
43+ a . padStart ? ok : err ;
44+ ! a . padStart ? err : ok ;
45+
46+ if ( a . padStart ) {
47+ ok ;
48+ } else {
49+ err ;
50+ }
51+ if ( ! a . padStart ) {
1452 err ;
1553} else {
1654 ok ;
Original file line number Diff line number Diff line change 1+ import _Reflect$construct from "core-js-pure/stable/reflect/construct.js" ;
2+ import _Symbol from "core-js-pure/stable/symbol/index.js" ;
13import _padStartInstanceProperty from "core-js-pure/stable/instance/pad-start.js" ;
2- _padStartInstanceProperty ( String . prototype ) ;
4+ _Reflect$construct ;
35ok ;
46ok ;
57ok ;
911{
1012 ok ;
1113}
14+ _Symbol . dispose || err ;
15+ ! _Symbol . dispose || ok ;
16+ _Symbol . dispose ? ok : err ;
17+ ! _Symbol . dispose ? err : ok ;
18+ if ( _Symbol . dispose ) {
19+ ok ;
20+ } else {
21+ err ;
22+ }
23+ if ( ! _Symbol . dispose ) {
24+ err ;
25+ } else {
26+ ok ;
27+ }
28+ _padStartInstanceProperty ( a ) || err ;
29+ ! _padStartInstanceProperty ( a ) || ok ;
30+ _padStartInstanceProperty ( a ) ? ok : err ;
31+ ! _padStartInstanceProperty ( a ) ? err : ok ;
32+ if ( _padStartInstanceProperty ( a ) ) {
33+ ok ;
34+ } else {
35+ err ;
36+ }
37+ if ( ! _padStartInstanceProperty ( a ) ) {
38+ err ;
39+ } else {
40+ ok ;
41+ }
You can’t perform that action at this time.
0 commit comments