Skip to content

Commit 0066b02

Browse files
committed
Accept new baselines
1 parent 4c933ae commit 0066b02

4 files changed

+23
-13
lines changed

tests/baselines/reference/nonPrimitiveAndTypeVariables.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ tests/cases/conformance/types/nonPrimitive/nonPrimitiveAndTypeVariables.ts(11,9)
99
type A<T, V> = { [P in keyof T]: T[P] extends V ? 1 : 0; };
1010
type B<T, V> = { [P in keyof T]: T[P] extends V | object ? 1 : 0; };
1111

12-
type a = A<{ a: 0 | 1 }, 0>; // { a: 0; }
13-
type b = B<{ a: 0 | 1 }, 0>; // { a: 0; }
12+
let a: A<{ a: 0 | 1 }, 0> = { a: 0 };
13+
let b: B<{ a: 0 | 1 }, 0> = { a: 0 };
1414

1515
function foo<T, U>(x: T) {
1616
let a: object = x; // Error

tests/baselines/reference/nonPrimitiveAndTypeVariables.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
type A<T, V> = { [P in keyof T]: T[P] extends V ? 1 : 0; };
55
type B<T, V> = { [P in keyof T]: T[P] extends V | object ? 1 : 0; };
66

7-
type a = A<{ a: 0 | 1 }, 0>; // { a: 0; }
8-
type b = B<{ a: 0 | 1 }, 0>; // { a: 0; }
7+
let a: A<{ a: 0 | 1 }, 0> = { a: 0 };
8+
let b: B<{ a: 0 | 1 }, 0> = { a: 0 };
99

1010
function foo<T, U>(x: T) {
1111
let a: object = x; // Error
@@ -16,6 +16,8 @@ function foo<T, U>(x: T) {
1616
//// [nonPrimitiveAndTypeVariables.js]
1717
"use strict";
1818
// Repros from #23800
19+
var a = { a: 0 };
20+
var b = { a: 0 };
1921
function foo(x) {
2022
var a = x; // Error
2123
var b = x; // Error

tests/baselines/reference/nonPrimitiveAndTypeVariables.symbols

+9-7
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,20 @@ type B<T, V> = { [P in keyof T]: T[P] extends V | object ? 1 : 0; };
2121
>P : Symbol(P, Decl(nonPrimitiveAndTypeVariables.ts, 3, 18))
2222
>V : Symbol(V, Decl(nonPrimitiveAndTypeVariables.ts, 3, 9))
2323

24-
type a = A<{ a: 0 | 1 }, 0>; // { a: 0; }
25-
>a : Symbol(a, Decl(nonPrimitiveAndTypeVariables.ts, 3, 68))
24+
let a: A<{ a: 0 | 1 }, 0> = { a: 0 };
25+
>a : Symbol(a, Decl(nonPrimitiveAndTypeVariables.ts, 5, 3))
2626
>A : Symbol(A, Decl(nonPrimitiveAndTypeVariables.ts, 0, 0))
27-
>a : Symbol(a, Decl(nonPrimitiveAndTypeVariables.ts, 5, 12))
27+
>a : Symbol(a, Decl(nonPrimitiveAndTypeVariables.ts, 5, 10))
28+
>a : Symbol(a, Decl(nonPrimitiveAndTypeVariables.ts, 5, 29))
2829

29-
type b = B<{ a: 0 | 1 }, 0>; // { a: 0; }
30-
>b : Symbol(b, Decl(nonPrimitiveAndTypeVariables.ts, 5, 28))
30+
let b: B<{ a: 0 | 1 }, 0> = { a: 0 };
31+
>b : Symbol(b, Decl(nonPrimitiveAndTypeVariables.ts, 6, 3))
3132
>B : Symbol(B, Decl(nonPrimitiveAndTypeVariables.ts, 2, 59))
32-
>a : Symbol(a, Decl(nonPrimitiveAndTypeVariables.ts, 6, 12))
33+
>a : Symbol(a, Decl(nonPrimitiveAndTypeVariables.ts, 6, 10))
34+
>a : Symbol(a, Decl(nonPrimitiveAndTypeVariables.ts, 6, 29))
3335

3436
function foo<T, U>(x: T) {
35-
>foo : Symbol(foo, Decl(nonPrimitiveAndTypeVariables.ts, 6, 28))
37+
>foo : Symbol(foo, Decl(nonPrimitiveAndTypeVariables.ts, 6, 37))
3638
>T : Symbol(T, Decl(nonPrimitiveAndTypeVariables.ts, 8, 13))
3739
>U : Symbol(U, Decl(nonPrimitiveAndTypeVariables.ts, 8, 15))
3840
>x : Symbol(x, Decl(nonPrimitiveAndTypeVariables.ts, 8, 19))

tests/baselines/reference/nonPrimitiveAndTypeVariables.types

+8-2
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,21 @@ type B<T, V> = { [P in keyof T]: T[P] extends V | object ? 1 : 0; };
2121
>P : P
2222
>V : V
2323

24-
type a = A<{ a: 0 | 1 }, 0>; // { a: 0; }
24+
let a: A<{ a: 0 | 1 }, 0> = { a: 0 };
2525
>a : A<{ a: 0 | 1; }, 0>
2626
>A : A<T, V>
2727
>a : 0 | 1
28+
>{ a: 0 } : { a: 0; }
29+
>a : 0
30+
>0 : 0
2831

29-
type b = B<{ a: 0 | 1 }, 0>; // { a: 0; }
32+
let b: B<{ a: 0 | 1 }, 0> = { a: 0 };
3033
>b : B<{ a: 0 | 1; }, 0>
3134
>B : B<T, V>
3235
>a : 0 | 1
36+
>{ a: 0 } : { a: 0; }
37+
>a : 0
38+
>0 : 0
3339

3440
function foo<T, U>(x: T) {
3541
>foo : <T, U>(x: T) => void

0 commit comments

Comments
 (0)