@@ -11,16 +11,92 @@ class B extends A {
1111>B : Symbol(B, Decl(asyncMethodWithSuper_es6.ts, 3, 1))
1212>A : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
1313
14- async y() {
15- >y : Symbol(y, Decl(asyncMethodWithSuper_es6.ts, 5, 19))
14+ // async method with only call/get on 'super' does not require a binding
15+ async simple() {
16+ >simple : Symbol(simple, Decl(asyncMethodWithSuper_es6.ts, 5, 19))
1617
18+ // call with property access
1719 super.x();
1820>super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
1921>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
2022>x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
2123
24+ // call with element access
2225 super["x"]();
2326>super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
2427>"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
28+
29+ // property access (read)
30+ const a = super.x;
31+ >a : Symbol(a, Decl(asyncMethodWithSuper_es6.ts, 15, 13))
32+ >super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
33+ >super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
34+ >x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
35+
36+ // element access (read)
37+ const b = super["x"];
38+ >b : Symbol(b, Decl(asyncMethodWithSuper_es6.ts, 18, 13))
39+ >super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
40+ >"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
41+ }
42+
43+ // async method with assignment/destructuring on 'super' requires a binding
44+ async advanced() {
45+ >advanced : Symbol(advanced, Decl(asyncMethodWithSuper_es6.ts, 19, 5))
46+
47+ const f = () => {};
48+ >f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 23, 13))
49+
50+ // call with property access
51+ super.x();
52+ >super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
53+ >super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
54+ >x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
55+
56+ // call with element access
57+ super["x"]();
58+ >super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
59+ >"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
60+
61+ // property access (read)
62+ const a = super.x;
63+ >a : Symbol(a, Decl(asyncMethodWithSuper_es6.ts, 32, 13))
64+ >super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
65+ >super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
66+ >x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
67+
68+ // element access (read)
69+ const b = super["x"];
70+ >b : Symbol(b, Decl(asyncMethodWithSuper_es6.ts, 35, 13))
71+ >super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
72+ >"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
73+
74+ // property access (assign)
75+ super.x = f;
76+ >super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
77+ >super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
78+ >x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
79+ >f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 23, 13))
80+
81+ // element access (assign)
82+ super["x"] = f;
83+ >super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
84+ >"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
85+ >f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 23, 13))
86+
87+ // destructuring assign with property access
88+ ({ f: super.x } = { f });
89+ >f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 44, 10))
90+ >super.x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
91+ >super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
92+ >x : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
93+ >f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 44, 27))
94+
95+ // destructuring assign with element access
96+ ({ f: super["x"] } = { f });
97+ >f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 47, 10))
98+ >super : Symbol(A, Decl(asyncMethodWithSuper_es6.ts, 0, 0))
99+ >"x" : Symbol(A.x, Decl(asyncMethodWithSuper_es6.ts, 0, 9))
100+ >f : Symbol(f, Decl(asyncMethodWithSuper_es6.ts, 47, 30))
25101 }
26102}
0 commit comments