forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharrayConcat2.symbols
More file actions
65 lines (49 loc) · 2.68 KB
/
arrayConcat2.symbols
File metadata and controls
65 lines (49 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
=== tests/cases/compiler/arrayConcat2.ts ===
var a: string[] = [];
>a : Symbol(a, Decl(arrayConcat2.ts, 0, 3))
a.concat("hello", 'world');
>a.concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>a : Symbol(a, Decl(arrayConcat2.ts, 0, 3))
>concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
a.concat('Hello');
>a.concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>a : Symbol(a, Decl(arrayConcat2.ts, 0, 3))
>concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
var b = new Array<string>();
>b : Symbol(b, Decl(arrayConcat2.ts, 5, 3))
>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
b.concat('hello');
>b.concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>b : Symbol(b, Decl(arrayConcat2.ts, 5, 3))
>concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
const expected1: undefined = undefined as Flatten<undefined>;
>expected1 : Symbol(expected1, Decl(arrayConcat2.ts, 8, 5))
>undefined : Symbol(undefined)
>Flatten : Symbol(Flatten, Decl(lib.es5.d.ts, --, --))
// #19535
let [actual2] = (undefined as unknown as string[][]).concat([""]);
>actual2 : Symbol(actual2, Decl(arrayConcat2.ts, 12, 5))
>(undefined as unknown as string[][]).concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>undefined : Symbol(undefined)
>concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
const expected2: string | string[] = actual2;
>expected2 : Symbol(expected2, Decl(arrayConcat2.ts, 13, 5))
>actual2 : Symbol(actual2, Decl(arrayConcat2.ts, 12, 5))
actual2 = undefined as unknown as string | string[];
>actual2 : Symbol(actual2, Decl(arrayConcat2.ts, 12, 5))
>undefined : Symbol(undefined)
// #26378
let [actual3] = [""].concat([1]);
>actual3 : Symbol(actual3, Decl(arrayConcat2.ts, 18, 5))
>[""].concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
const expected3: string | number = actual3;
>expected3 : Symbol(expected3, Decl(arrayConcat2.ts, 19, 5))
>actual3 : Symbol(actual3, Decl(arrayConcat2.ts, 18, 5))
actual3 = undefined as unknown as string | number;
>actual3 : Symbol(actual3, Decl(arrayConcat2.ts, 18, 5))
>undefined : Symbol(undefined)
// #26976
[].concat([""]);
>[].concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
>concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))