Skip to content

Commit 8a76939

Browse files
committed
Accept new baselines
1 parent 634c75c commit 8a76939

6 files changed

+85
-31
lines changed

tests/baselines/reference/contextualTypingWithGenericSignature.types

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ var f2: {
1616
};
1717

1818
f2 = (x, y) => { return x }
19-
>f2 = (x, y) => { return x } : (x: any, y: any) => any
19+
>f2 = (x, y) => { return x } : (x: T, y: U) => T
2020
>f2 : <T, U>(x: T, y: U) => T
21-
>(x, y) => { return x } : (x: any, y: any) => any
22-
>x : any
23-
>y : any
24-
>x : any
21+
>(x, y) => { return x } : (x: T, y: U) => T
22+
>x : T
23+
>y : U
24+
>x : T
2525

tests/baselines/reference/genericFunctionHasFreshTypeArgs.types

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ function f(p: <T>(x: T) => void) { };
99
f(x => f(y => x = y));
1010
>f(x => f(y => x = y)) : void
1111
>f : (p: <T>(x: T) => void) => void
12-
>x => f(y => x = y) : (x: any) => void
13-
>x : any
12+
>x => f(y => x = y) : (x: T) => void
13+
>x : T
1414
>f(y => x = y) : void
1515
>f : (p: <T>(x: T) => void) => void
16-
>y => x = y : (y: any) => any
17-
>y : any
18-
>x = y : any
19-
>x : any
20-
>y : any
16+
>y => x = y : (y: T) => T
17+
>y : T
18+
>x = y : T
19+
>x : T
20+
>y : T
2121

tests/baselines/reference/genericTypeAssertions3.types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ var r = < <T>(x: T) => T > ((x) => { return null; }); // bug was 'could not find
66
>x : T
77
>T : T
88
>T : T
9-
>((x) => { return null; }) : (x: any) => any
10-
>(x) => { return null; } : (x: any) => any
11-
>x : any
9+
>((x) => { return null; }) : (x: T) => any
10+
>(x) => { return null; } : (x: T) => any
11+
>x : T
1212
>null : null
1313

1414
var s = < <T>(x: T) => T > ((x: any) => { return null; }); // no error

tests/baselines/reference/implicitAnyGenericTypeInference.errors.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
=== tests/cases/compiler/implicitAnyGenericTypeInference.ts ===
2+
interface Comparer<T> {
3+
>Comparer : Symbol(Comparer, Decl(implicitAnyGenericTypeInference.ts, 0, 0))
4+
>T : Symbol(T, Decl(implicitAnyGenericTypeInference.ts, 0, 19))
5+
6+
compareTo<U>(x: T, y: U): U;
7+
>compareTo : Symbol(Comparer.compareTo, Decl(implicitAnyGenericTypeInference.ts, 0, 23))
8+
>U : Symbol(U, Decl(implicitAnyGenericTypeInference.ts, 1, 14))
9+
>x : Symbol(x, Decl(implicitAnyGenericTypeInference.ts, 1, 17))
10+
>T : Symbol(T, Decl(implicitAnyGenericTypeInference.ts, 0, 19))
11+
>y : Symbol(y, Decl(implicitAnyGenericTypeInference.ts, 1, 22))
12+
>U : Symbol(U, Decl(implicitAnyGenericTypeInference.ts, 1, 14))
13+
>U : Symbol(U, Decl(implicitAnyGenericTypeInference.ts, 1, 14))
14+
}
15+
16+
var c: Comparer<any>;
17+
>c : Symbol(c, Decl(implicitAnyGenericTypeInference.ts, 4, 3))
18+
>Comparer : Symbol(Comparer, Decl(implicitAnyGenericTypeInference.ts, 0, 0))
19+
20+
c = { compareTo: (x, y) => { return y; } };
21+
>c : Symbol(c, Decl(implicitAnyGenericTypeInference.ts, 4, 3))
22+
>compareTo : Symbol(compareTo, Decl(implicitAnyGenericTypeInference.ts, 5, 5))
23+
>x : Symbol(x, Decl(implicitAnyGenericTypeInference.ts, 5, 18))
24+
>y : Symbol(y, Decl(implicitAnyGenericTypeInference.ts, 5, 20))
25+
>y : Symbol(y, Decl(implicitAnyGenericTypeInference.ts, 5, 20))
26+
27+
var r = c.compareTo(1, '');
28+
>r : Symbol(r, Decl(implicitAnyGenericTypeInference.ts, 6, 3))
29+
>c.compareTo : Symbol(Comparer.compareTo, Decl(implicitAnyGenericTypeInference.ts, 0, 23))
30+
>c : Symbol(c, Decl(implicitAnyGenericTypeInference.ts, 4, 3))
31+
>compareTo : Symbol(Comparer.compareTo, Decl(implicitAnyGenericTypeInference.ts, 0, 23))
32+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
=== tests/cases/compiler/implicitAnyGenericTypeInference.ts ===
2+
interface Comparer<T> {
3+
>Comparer : Comparer<T>
4+
>T : T
5+
6+
compareTo<U>(x: T, y: U): U;
7+
>compareTo : <U>(x: T, y: U) => U
8+
>U : U
9+
>x : T
10+
>T : T
11+
>y : U
12+
>U : U
13+
>U : U
14+
}
15+
16+
var c: Comparer<any>;
17+
>c : Comparer<any>
18+
>Comparer : Comparer<T>
19+
20+
c = { compareTo: (x, y) => { return y; } };
21+
>c = { compareTo: (x, y) => { return y; } } : { compareTo: (x: any, y: U) => U; }
22+
>c : Comparer<any>
23+
>{ compareTo: (x, y) => { return y; } } : { compareTo: (x: any, y: U) => U; }
24+
>compareTo : (x: any, y: U) => U
25+
>(x, y) => { return y; } : (x: any, y: U) => U
26+
>x : any
27+
>y : U
28+
>y : U
29+
30+
var r = c.compareTo(1, '');
31+
>r : string
32+
>c.compareTo(1, '') : ""
33+
>c.compareTo : <U>(x: any, y: U) => U
34+
>c : Comparer<any>
35+
>compareTo : <U>(x: any, y: U) => U
36+
>1 : 1
37+
>'' : ""
38+

0 commit comments

Comments
 (0)