/
_expected.js
57 lines (49 loc) · 906 Bytes
/
_expected.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
const removed1 = {
foo: () => {},
foo: () => {},
['f' + 'oo']: () => {}
};
removed1.foo();
const removed2 = {
foo: () => console.log( 'effect' ),
foo: () => {}
};
removed2.foo();
const removed3 = {
['fo' + 'o']: function () {this.x = 1;},
['f' + 'oo']: () => console.log( 'effect' ),
foo: () => {}
};
removed3.foo();
const retained1 = {
foo: () => {},
foo: function () {this.x = 1;}
};
retained1.foo();
const retained2 = {
foo: () => {},
['f' + 'oo']: function () {this.x = 1;},
['b' + 'ar']: () => {}
};
retained2.foo();
const retained3 = {
['fo' + 'o']: () => {},
['f' + 'oo']: () => {}
};
retained3.bar();
const retained4 = {
foo: {},
foo: globalThis.unknown
};
retained4.foo.bar = 1;
const retained5 = {
foo: {},
['f' + 'oo']: globalThis.unknown,
['b' + 'ar']: {},
};
retained5.foo.bar = 1;
const retained6 = {
['fo' + 'o']: {},
['f' + 'oo']: {}
};
retained6.bar.baz = 1;