@@ -285,3 +285,22 @@ async function fGenericIndexedTypeForExplicitPromiseOfKProp<TObj extends Obj, K
285285>obj : Symbol(obj, Decl(asyncFunctionReturnType.ts, 72, 100))
286286>key : Symbol(key, Decl(asyncFunctionReturnType.ts, 72, 110))
287287}
288+
289+ // #27711
290+
291+ async function fGeneric<T>(x: T) {
292+ >fGeneric : Symbol(fGeneric, Decl(asyncFunctionReturnType.ts, 74, 1))
293+ >T : Symbol(T, Decl(asyncFunctionReturnType.ts, 78, 24))
294+ >x : Symbol(x, Decl(asyncFunctionReturnType.ts, 78, 27))
295+ >T : Symbol(T, Decl(asyncFunctionReturnType.ts, 78, 24))
296+
297+ return x;
298+ >x : Symbol(x, Decl(asyncFunctionReturnType.ts, 78, 27))
299+ }
300+ const expected: Promise<string> = fGeneric(undefined as Promise<string>);
301+ >expected : Symbol(expected, Decl(asyncFunctionReturnType.ts, 81, 5))
302+ >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, --, --))
303+ >fGeneric : Symbol(fGeneric, Decl(asyncFunctionReturnType.ts, 74, 1))
304+ >undefined : Symbol(undefined)
305+ >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, --, --))
306+
0 commit comments