@@ -21,3 +21,45 @@ b.concat('hello');
21
21
>b : Symbol(b, Decl(arrayConcat2.ts, 5, 3))
22
22
>concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
23
23
24
+ const expected1: undefined = undefined as Flatten<undefined>;
25
+ >expected1 : Symbol(expected1, Decl(arrayConcat2.ts, 8, 5))
26
+ >undefined : Symbol(undefined)
27
+ >Flatten : Symbol(Flatten, Decl(lib.es5.d.ts, --, --))
28
+
29
+ // #19535
30
+
31
+ let [actual2] = (undefined as unknown as string[][]).concat([""]);
32
+ >actual2 : Symbol(actual2, Decl(arrayConcat2.ts, 12, 5))
33
+ >(undefined as unknown as string[][]).concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
34
+ >undefined : Symbol(undefined)
35
+ >concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
36
+
37
+ const expected2: string | string[] = actual2;
38
+ >expected2 : Symbol(expected2, Decl(arrayConcat2.ts, 13, 5))
39
+ >actual2 : Symbol(actual2, Decl(arrayConcat2.ts, 12, 5))
40
+
41
+ actual2 = undefined as unknown as string | string[];
42
+ >actual2 : Symbol(actual2, Decl(arrayConcat2.ts, 12, 5))
43
+ >undefined : Symbol(undefined)
44
+
45
+ // #26378
46
+
47
+ let [actual3] = [""].concat([1]);
48
+ >actual3 : Symbol(actual3, Decl(arrayConcat2.ts, 18, 5))
49
+ >[""].concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
50
+ >concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
51
+
52
+ const expected3: string | number = actual3;
53
+ >expected3 : Symbol(expected3, Decl(arrayConcat2.ts, 19, 5))
54
+ >actual3 : Symbol(actual3, Decl(arrayConcat2.ts, 18, 5))
55
+
56
+ actual3 = undefined as unknown as string | number;
57
+ >actual3 : Symbol(actual3, Decl(arrayConcat2.ts, 18, 5))
58
+ >undefined : Symbol(undefined)
59
+
60
+ // #26976
61
+
62
+ [].concat([""]);
63
+ >[].concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
64
+ >concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
65
+
0 commit comments