Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit aa0ae22

Browse filesBrowse files
committed
Update baselines
1 parent f93f78d commit aa0ae22
Copy full SHA for aa0ae22

6 files changed

+8-12Lines changed: 8 additions & 12 deletions
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎tests/baselines/reference/genericCallWithObjectLiteralArgs.js‎

Copy file name to clipboardExpand all lines: tests/baselines/reference/genericCallWithObjectLiteralArgs.js
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ function foo<T>(x: { bar: T; baz: T }) {
55

66
var r = foo({ bar: 1, baz: '' }); // T = {}
77
var r2 = foo({ bar: 1, baz: 1 }); // T = number
8-
// BUG 835724
9-
var r3 = foo({ bar: foo, baz: foo }); // T = any
8+
var r3 = foo({ bar: foo, baz: foo }); // T = typeof foo
109
var r4 = foo<Object>({ bar: 1, baz: '' }); // T = Object
1110

1211
//// [genericCallWithObjectLiteralArgs.js]
@@ -15,6 +14,5 @@ function foo(x) {
1514
}
1615
var r = foo({ bar: 1, baz: '' }); // T = {}
1716
var r2 = foo({ bar: 1, baz: 1 }); // T = number
18-
// BUG 835724
19-
var r3 = foo({ bar: foo, baz: foo }); // T = any
17+
var r3 = foo({ bar: foo, baz: foo }); // T = typeof foo
2018
var r4 = foo({ bar: 1, baz: '' }); // T = Object
Collapse file

‎tests/baselines/reference/genericCallWithObjectLiteralArgs.types‎

Copy file name to clipboardExpand all lines: tests/baselines/reference/genericCallWithObjectLiteralArgs.types
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ var r2 = foo({ bar: 1, baz: 1 }); // T = number
2828
>bar : number
2929
>baz : number
3030

31-
// BUG 835724
32-
var r3 = foo({ bar: foo, baz: foo }); // T = any
31+
var r3 = foo({ bar: foo, baz: foo }); // T = typeof foo
3332
>r3 : { bar: typeof foo; baz: typeof foo; }
3433
>foo({ bar: foo, baz: foo }) : { bar: typeof foo; baz: typeof foo; }
3534
>foo : typeof foo
Collapse file

‎tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.js‎

Copy file name to clipboardExpand all lines: tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module GenericParameter {
2626
new (x: boolean): string;
2727
new (x: number): boolean;
2828
}
29-
var r5 = foo5(a); // new{} => string; new(x:number) => {}
29+
var r5 = foo5(a); // new boolean => string; new(x:number) => boolean
3030
var b: { new<T>(x: T): string; new<T>(x: number): T; }
3131
var r7 = foo5(b); // new any => string; new(x:number) => any
3232

@@ -67,7 +67,7 @@ var GenericParameter;
6767
return cb;
6868
}
6969
var a;
70-
var r5 = foo5(a); // new{} => string; new(x:number) => {}
70+
var r5 = foo5(a); // new boolean => string; new(x:number) => boolean
7171
var b;
7272
var r7 = foo5(b); // new any => string; new(x:number) => any
7373
function foo6(cb) {
Collapse file

‎tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types‎

Copy file name to clipboardExpand all lines: tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.types
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ module GenericParameter {
7070
new (x: number): boolean;
7171
>x : number
7272
}
73-
var r5 = foo5(a); // new{} => string; new(x:number) => {}
73+
var r5 = foo5(a); // new boolean => string; new(x:number) => boolean
7474
>r5 : { new (x: boolean): string; new (x: number): boolean; }
7575
>foo5(a) : { new (x: boolean): string; new (x: number): boolean; }
7676
>foo5 : typeof foo5
Collapse file

‎tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectLiteralArgs.ts‎

Copy file name to clipboardExpand all lines: tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectLiteralArgs.ts
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ function foo<T>(x: { bar: T; baz: T }) {
44

55
var r = foo({ bar: 1, baz: '' }); // T = {}
66
var r2 = foo({ bar: 1, baz: 1 }); // T = number
7-
// BUG 835724
8-
var r3 = foo({ bar: foo, baz: foo }); // T = any
7+
var r3 = foo({ bar: foo, baz: foo }); // T = typeof foo
98
var r4 = foo<Object>({ bar: 1, baz: '' }); // T = Object
Collapse file

‎tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments.ts‎

Copy file name to clipboardExpand all lines: tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module GenericParameter {
2525
new (x: boolean): string;
2626
new (x: number): boolean;
2727
}
28-
var r5 = foo5(a); // new{} => string; new(x:number) => {}
28+
var r5 = foo5(a); // new boolean => string; new(x:number) => boolean
2929
var b: { new<T>(x: T): string; new<T>(x: number): T; }
3030
var r7 = foo5(b); // new any => string; new(x:number) => any
3131

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.