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