Skip to content

Commit ea1bdff

Browse files
committed
Accept new baselines
1 parent 83971d0 commit ea1bdff

7 files changed

Lines changed: 65 additions & 22 deletions

tests/baselines/reference/instanceOfAssignability.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ function fn5(x: Derived1) {
133133
// 1.5: y: Derived1
134134
// Want: ???
135135
let y = x;
136-
>y : never
137-
>x : never
136+
>y : Derived1 & Derived2
137+
>x : Derived1 & Derived2
138138
}
139139
}
140140

tests/baselines/reference/stringLiteralTypesAsTags01.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,6 @@ if (!hasKind(x, "B")) {
116116
}
117117
else {
118118
let d = x;
119-
>d : never
120-
>x : never
119+
>d : A & B
120+
>x : A & B
121121
}

tests/baselines/reference/stringLiteralTypesAsTags02.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,6 @@ if (!hasKind(x, "B")) {
110110
}
111111
else {
112112
let d = x;
113-
>d : never
114-
>x : never
113+
>d : A & B
114+
>x : A & B
115115
}

tests/baselines/reference/stringLiteralTypesAsTags03.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,6 @@ if (!hasKind(x, "B")) {
113113
}
114114
else {
115115
let d = x;
116-
>d : never
117-
>x : never
116+
>d : A & B
117+
>x : A & B
118118
}

tests/baselines/reference/typeGuardsWithInstanceOf.errors.txt

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
=== tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOf.ts ===
2+
interface I { global: string; }
3+
>I : Symbol(I, Decl(typeGuardsWithInstanceOf.ts, 0, 0))
4+
>global : Symbol(I.global, Decl(typeGuardsWithInstanceOf.ts, 0, 13))
5+
6+
var result: I;
7+
>result : Symbol(result, Decl(typeGuardsWithInstanceOf.ts, 1, 3))
8+
>I : Symbol(I, Decl(typeGuardsWithInstanceOf.ts, 0, 0))
9+
10+
var result2: I;
11+
>result2 : Symbol(result2, Decl(typeGuardsWithInstanceOf.ts, 2, 3))
12+
>I : Symbol(I, Decl(typeGuardsWithInstanceOf.ts, 0, 0))
13+
14+
if (!(result instanceof RegExp)) {
15+
>result : Symbol(result, Decl(typeGuardsWithInstanceOf.ts, 1, 3))
16+
>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
17+
18+
result = result2;
19+
>result : Symbol(result, Decl(typeGuardsWithInstanceOf.ts, 1, 3))
20+
>result2 : Symbol(result2, Decl(typeGuardsWithInstanceOf.ts, 2, 3))
21+
22+
} else if (!result.global) {
23+
>result.global : Symbol(global, Decl(typeGuardsWithInstanceOf.ts, 0, 13), Decl(lib.d.ts, --, --))
24+
>result : Symbol(result, Decl(typeGuardsWithInstanceOf.ts, 1, 3))
25+
>global : Symbol(global, Decl(typeGuardsWithInstanceOf.ts, 0, 13), Decl(lib.d.ts, --, --))
26+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
=== tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOf.ts ===
2+
interface I { global: string; }
3+
>I : I
4+
>global : string
5+
6+
var result: I;
7+
>result : I
8+
>I : I
9+
10+
var result2: I;
11+
>result2 : I
12+
>I : I
13+
14+
if (!(result instanceof RegExp)) {
15+
>!(result instanceof RegExp) : boolean
16+
>(result instanceof RegExp) : boolean
17+
>result instanceof RegExp : boolean
18+
>result : I
19+
>RegExp : RegExpConstructor
20+
21+
result = result2;
22+
>result = result2 : I
23+
>result : I
24+
>result2 : I
25+
26+
} else if (!result.global) {
27+
>!result.global : boolean
28+
>result.global : string & boolean
29+
>result : I & RegExp
30+
>global : string & boolean
31+
}

0 commit comments

Comments
 (0)