Bug Report
Moved from #47208 (comment)
π Search Terms
RangeError Maximum call stack size exceeded getAwaitedTypeNoAlias
π Version & Regression Information
- This is the behavior in every version I tried.
β― Playground Link
Playground Link
π» Code
type T = 1 | Promise<T> | T[];
export async function myFunction(param: T) {
const awaited = await param
}
π Actual behavior
RangeError: Maximum call stack size exceeded
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36632:70)
at mapper (src\compiler\checker.ts:36628:71)
at mapType (src\compiler\checker.ts:23959:95)
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36629:60)
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36678:37)
at mapper (src\compiler\checker.ts:36628:71)
at mapType (src\compiler\checker.ts:23959:95)
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36629:60)
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36678:37)
at mapper (src\compiler\checker.ts:36628:71)
at mapType (src\compiler\checker.ts:23959:95)
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36629:60)
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36678:37)
at mapper (src\compiler\checker.ts:36628:71)
at mapType (src\compiler\checker.ts:23959:95)
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36629:60)
at getAwaitedTypeNoAlias (src\compiler\checker.ts:36678:37)
π Expected behavior
No crash.
Bug Report
Moved from #47208 (comment)
π Search Terms
RangeError Maximum call stack size exceeded getAwaitedTypeNoAlias
π Version & Regression Information
β― Playground Link
Playground Link
π» Code
π Actual behavior
π Expected behavior
No crash.