|
@ -5,7 +5,11 @@ mutate1( foo ); |
|
|
// should be included
|
|
|
// should be included
|
|
|
[ 'a', 'b', 'c' ].forEach( function ( letter, i ) { |
|
|
[ 'a', 'b', 'c' ].forEach( function ( letter, i ) { |
|
|
foo[ letter ] = i; |
|
|
foo[ letter ] = i; |
|
|
}) |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
[ 'd', 'e', 'f' ].forEach( ( letter, i ) => { |
|
|
|
|
|
foo[ letter ] = i; |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
function mutate1 ( obj ) { |
|
|
function mutate1 ( obj ) { |
|
|
obj.mutated = 1; |
|
|
obj.mutated = 1; |
|
@ -24,4 +28,22 @@ function unused2 () { |
|
|
mutate1( foo ); |
|
|
mutate1( foo ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var obj1 = { |
|
|
|
|
|
mutate3 () { foo.mutated = 3; } |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var obj2 = { |
|
|
|
|
|
mutate4: function () { foo.mutated = 4; } |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var obj3 = { |
|
|
|
|
|
mutate5: () => foo.mutated = 5 |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
class Mutator { |
|
|
|
|
|
mutate6 () { |
|
|
|
|
|
foo.mutated = 6; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
export default foo; |
|
|
export default foo; |
|
|