Accept new baselines
This commit is contained in:
parent
4c933aef9a
commit
0066b02772
4 changed files with 23 additions and 13 deletions
|
@ -9,8 +9,8 @@ tests/cases/conformance/types/nonPrimitive/nonPrimitiveAndTypeVariables.ts(11,9)
|
|||
type A<T, V> = { [P in keyof T]: T[P] extends V ? 1 : 0; };
|
||||
type B<T, V> = { [P in keyof T]: T[P] extends V | object ? 1 : 0; };
|
||||
|
||||
type a = A<{ a: 0 | 1 }, 0>; // { a: 0; }
|
||||
type b = B<{ a: 0 | 1 }, 0>; // { a: 0; }
|
||||
let a: A<{ a: 0 | 1 }, 0> = { a: 0 };
|
||||
let b: B<{ a: 0 | 1 }, 0> = { a: 0 };
|
||||
|
||||
function foo<T, U>(x: T) {
|
||||
let a: object = x; // Error
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
type A<T, V> = { [P in keyof T]: T[P] extends V ? 1 : 0; };
|
||||
type B<T, V> = { [P in keyof T]: T[P] extends V | object ? 1 : 0; };
|
||||
|
||||
type a = A<{ a: 0 | 1 }, 0>; // { a: 0; }
|
||||
type b = B<{ a: 0 | 1 }, 0>; // { a: 0; }
|
||||
let a: A<{ a: 0 | 1 }, 0> = { a: 0 };
|
||||
let b: B<{ a: 0 | 1 }, 0> = { a: 0 };
|
||||
|
||||
function foo<T, U>(x: T) {
|
||||
let a: object = x; // Error
|
||||
|
@ -16,6 +16,8 @@ function foo<T, U>(x: T) {
|
|||
//// [nonPrimitiveAndTypeVariables.js]
|
||||
"use strict";
|
||||
// Repros from #23800
|
||||
var a = { a: 0 };
|
||||
var b = { a: 0 };
|
||||
function foo(x) {
|
||||
var a = x; // Error
|
||||
var b = x; // Error
|
||||
|
|
|
@ -21,18 +21,20 @@ type B<T, V> = { [P in keyof T]: T[P] extends V | object ? 1 : 0; };
|
|||
>P : Symbol(P, Decl(nonPrimitiveAndTypeVariables.ts, 3, 18))
|
||||
>V : Symbol(V, Decl(nonPrimitiveAndTypeVariables.ts, 3, 9))
|
||||
|
||||
type a = A<{ a: 0 | 1 }, 0>; // { a: 0; }
|
||||
>a : Symbol(a, Decl(nonPrimitiveAndTypeVariables.ts, 3, 68))
|
||||
let a: A<{ a: 0 | 1 }, 0> = { a: 0 };
|
||||
>a : Symbol(a, Decl(nonPrimitiveAndTypeVariables.ts, 5, 3))
|
||||
>A : Symbol(A, Decl(nonPrimitiveAndTypeVariables.ts, 0, 0))
|
||||
>a : Symbol(a, Decl(nonPrimitiveAndTypeVariables.ts, 5, 12))
|
||||
>a : Symbol(a, Decl(nonPrimitiveAndTypeVariables.ts, 5, 10))
|
||||
>a : Symbol(a, Decl(nonPrimitiveAndTypeVariables.ts, 5, 29))
|
||||
|
||||
type b = B<{ a: 0 | 1 }, 0>; // { a: 0; }
|
||||
>b : Symbol(b, Decl(nonPrimitiveAndTypeVariables.ts, 5, 28))
|
||||
let b: B<{ a: 0 | 1 }, 0> = { a: 0 };
|
||||
>b : Symbol(b, Decl(nonPrimitiveAndTypeVariables.ts, 6, 3))
|
||||
>B : Symbol(B, Decl(nonPrimitiveAndTypeVariables.ts, 2, 59))
|
||||
>a : Symbol(a, Decl(nonPrimitiveAndTypeVariables.ts, 6, 12))
|
||||
>a : Symbol(a, Decl(nonPrimitiveAndTypeVariables.ts, 6, 10))
|
||||
>a : Symbol(a, Decl(nonPrimitiveAndTypeVariables.ts, 6, 29))
|
||||
|
||||
function foo<T, U>(x: T) {
|
||||
>foo : Symbol(foo, Decl(nonPrimitiveAndTypeVariables.ts, 6, 28))
|
||||
>foo : Symbol(foo, Decl(nonPrimitiveAndTypeVariables.ts, 6, 37))
|
||||
>T : Symbol(T, Decl(nonPrimitiveAndTypeVariables.ts, 8, 13))
|
||||
>U : Symbol(U, Decl(nonPrimitiveAndTypeVariables.ts, 8, 15))
|
||||
>x : Symbol(x, Decl(nonPrimitiveAndTypeVariables.ts, 8, 19))
|
||||
|
|
|
@ -21,15 +21,21 @@ type B<T, V> = { [P in keyof T]: T[P] extends V | object ? 1 : 0; };
|
|||
>P : P
|
||||
>V : V
|
||||
|
||||
type a = A<{ a: 0 | 1 }, 0>; // { a: 0; }
|
||||
let a: A<{ a: 0 | 1 }, 0> = { a: 0 };
|
||||
>a : A<{ a: 0 | 1; }, 0>
|
||||
>A : A<T, V>
|
||||
>a : 0 | 1
|
||||
>{ a: 0 } : { a: 0; }
|
||||
>a : 0
|
||||
>0 : 0
|
||||
|
||||
type b = B<{ a: 0 | 1 }, 0>; // { a: 0; }
|
||||
let b: B<{ a: 0 | 1 }, 0> = { a: 0 };
|
||||
>b : B<{ a: 0 | 1; }, 0>
|
||||
>B : B<T, V>
|
||||
>a : 0 | 1
|
||||
>{ a: 0 } : { a: 0; }
|
||||
>a : 0
|
||||
>0 : 0
|
||||
|
||||
function foo<T, U>(x: T) {
|
||||
>foo : <T, U>(x: T) => void
|
||||
|
|
Loading…
Reference in a new issue