@@ -111,3 +111,41 @@ const d = (v: number) => {
111111 }
112112};
113113
114+ // https://github.com/microsoft/TypeScript/issues/63004
115+ const report: (e: any) => never = (e): never => {
116+ >report : Symbol(report, Decl(reachabilityChecks12.ts, 59, 5))
117+ >e : Symbol(e, Decl(reachabilityChecks12.ts, 59, 15))
118+ >e : Symbol(e, Decl(reachabilityChecks12.ts, 59, 35))
119+
120+ throw e;
121+ >e : Symbol(e, Decl(reachabilityChecks12.ts, 59, 35))
122+
123+ };
124+
125+ const foo = async (): Promise<number> => {
126+ >foo : Symbol(foo, Decl(reachabilityChecks12.ts, 63, 5))
127+ >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
128+
129+ try {
130+ return 3;
131+ } catch (e) {
132+ >e : Symbol(e, Decl(reachabilityChecks12.ts, 66, 11))
133+
134+ report(e);
135+ >report : Symbol(report, Decl(reachabilityChecks12.ts, 59, 5))
136+ >e : Symbol(e, Decl(reachabilityChecks12.ts, 66, 11))
137+
138+ } finally {
139+ if (Math.random()) {
140+ >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
141+ >Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
142+ >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
143+
144+ console.log("heh");
145+ >console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
146+ >console : Symbol(console, Decl(lib.dom.d.ts, --, --))
147+ >log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
148+ }
149+ }
150+ };
151+
0 commit comments