Skip to content

Commit de837ed

Browse files
committed
Accept new baselines
1 parent c4bad64 commit de837ed

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

tests/baselines/reference/unionTypeInference.errors.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/conformance/types/typeRelationships/typeInference/unionTypeInference.ts(13,24): error TS2345: Argument of type '1' is not assignable to parameter of type 'string'.
2-
tests/cases/conformance/types/typeRelationships/typeInference/unionTypeInference.ts(31,13): error TS2345: Argument of type '42' is not assignable to parameter of type 'never'.
2+
tests/cases/conformance/types/typeRelationships/typeInference/unionTypeInference.ts(31,15): error TS2345: Argument of type '42' is not assignable to parameter of type 'never'.
33

44

55
==== tests/cases/conformance/types/typeRelationships/typeInference/unionTypeInference.ts (2 errors) ====
@@ -33,10 +33,10 @@ tests/cases/conformance/types/typeRelationships/typeInference/unionTypeInference
3333

3434
declare function f4<T>(x: string & T): T;
3535

36-
var d1 = f4("abc");
37-
var d2 = f4(s);
38-
var d3 = f4(42); // Error
39-
~~
36+
const d1 = f4("abc");
37+
const d2 = f4(s);
38+
const d3 = f4(42); // Error
39+
~~
4040
!!! error TS2345: Argument of type '42' is not assignable to parameter of type 'never'.
4141

4242
// Repros from #32434

tests/baselines/reference/unionTypeInference.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ const c5 = f3("abc"); // never
2727

2828
declare function f4<T>(x: string & T): T;
2929

30-
var d1 = f4("abc");
31-
var d2 = f4(s);
32-
var d3 = f4(42); // Error
30+
const d1 = f4("abc");
31+
const d2 = f4(s);
32+
const d3 = f4(42); // Error
3333

3434
// Repros from #32434
3535

tests/baselines/reference/unionTypeInference.symbols

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,23 +94,23 @@ declare function f4<T>(x: string & T): T;
9494
>T : Symbol(T, Decl(unionTypeInference.ts, 26, 20))
9595
>T : Symbol(T, Decl(unionTypeInference.ts, 26, 20))
9696

97-
var d1 = f4("abc");
98-
>d1 : Symbol(d1, Decl(unionTypeInference.ts, 28, 3))
97+
const d1 = f4("abc");
98+
>d1 : Symbol(d1, Decl(unionTypeInference.ts, 28, 5))
9999
>f4 : Symbol(f4, Decl(unionTypeInference.ts, 24, 21))
100100

101-
var d2 = f4(s);
102-
>d2 : Symbol(d2, Decl(unionTypeInference.ts, 29, 3))
101+
const d2 = f4(s);
102+
>d2 : Symbol(d2, Decl(unionTypeInference.ts, 29, 5))
103103
>f4 : Symbol(f4, Decl(unionTypeInference.ts, 24, 21))
104104
>s : Symbol(s, Decl(unionTypeInference.ts, 1, 13))
105105

106-
var d3 = f4(42); // Error
107-
>d3 : Symbol(d3, Decl(unionTypeInference.ts, 30, 3))
106+
const d3 = f4(42); // Error
107+
>d3 : Symbol(d3, Decl(unionTypeInference.ts, 30, 5))
108108
>f4 : Symbol(f4, Decl(unionTypeInference.ts, 24, 21))
109109

110110
// Repros from #32434
111111

112112
declare function foo<T>(x: T | Promise<T>): void;
113-
>foo : Symbol(foo, Decl(unionTypeInference.ts, 30, 16))
113+
>foo : Symbol(foo, Decl(unionTypeInference.ts, 30, 18))
114114
>T : Symbol(T, Decl(unionTypeInference.ts, 34, 21))
115115
>x : Symbol(x, Decl(unionTypeInference.ts, 34, 24))
116116
>T : Symbol(T, Decl(unionTypeInference.ts, 34, 21))
@@ -122,7 +122,7 @@ declare let x: false | Promise<true>;
122122
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --))
123123

124124
foo(x);
125-
>foo : Symbol(foo, Decl(unionTypeInference.ts, 30, 16))
125+
>foo : Symbol(foo, Decl(unionTypeInference.ts, 30, 18))
126126
>x : Symbol(x, Decl(unionTypeInference.ts, 35, 11))
127127

128128
declare function bar<T>(x: T, y: string | T): T;

tests/baselines/reference/unionTypeInference.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,19 @@ declare function f4<T>(x: string & T): T;
113113
>f4 : <T>(x: string & T) => T
114114
>x : string & T
115115

116-
var d1 = f4("abc");
117-
>d1 : string
116+
const d1 = f4("abc");
117+
>d1 : "abc"
118118
>f4("abc") : "abc"
119119
>f4 : <T>(x: string & T) => T
120120
>"abc" : "abc"
121121

122-
var d2 = f4(s);
122+
const d2 = f4(s);
123123
>d2 : unknown
124124
>f4(s) : unknown
125125
>f4 : <T>(x: string & T) => T
126126
>s : string
127127

128-
var d3 = f4(42); // Error
128+
const d3 = f4(42); // Error
129129
>d3 : any
130130
>f4(42) : any
131131
>f4 : <T>(x: string & T) => T

0 commit comments

Comments
 (0)