TypeScript/tests/baselines/reference/arrayFlatNoCrashInferenceDeclarations.symbols
Wesley Wigham 6a777ff6b3
Fix crash when serializing the return type of a generic call to Array.prototype.flat (#38904)
* Add declaration emit error and checking for circularly referential unions produced by recursive conditionals

* Allow indexed accesses to produce alias symbols on types

* Add test that still triggers the declaration emit error

* Fix spelling
2020-06-15 11:46:10 -07:00

15 lines
807 B
Plaintext

=== tests/cases/compiler/arrayFlatNoCrashInferenceDeclarations.ts ===
function foo<T>(arr: T[], depth: number) {
>foo : Symbol(foo, Decl(arrayFlatNoCrashInferenceDeclarations.ts, 0, 0))
>T : Symbol(T, Decl(arrayFlatNoCrashInferenceDeclarations.ts, 0, 13))
>arr : Symbol(arr, Decl(arrayFlatNoCrashInferenceDeclarations.ts, 0, 16))
>T : Symbol(T, Decl(arrayFlatNoCrashInferenceDeclarations.ts, 0, 13))
>depth : Symbol(depth, Decl(arrayFlatNoCrashInferenceDeclarations.ts, 0, 25))
return arr.flat(depth);
>arr.flat : Symbol(Array.flat, Decl(lib.es2019.array.d.ts, --, --))
>arr : Symbol(arr, Decl(arrayFlatNoCrashInferenceDeclarations.ts, 0, 16))
>flat : Symbol(Array.flat, Decl(lib.es2019.array.d.ts, --, --))
>depth : Symbol(depth, Decl(arrayFlatNoCrashInferenceDeclarations.ts, 0, 25))
}