update test with pr feedback
This commit is contained in:
parent
321bb9aafa
commit
9531d929c7
4 changed files with 16 additions and 12 deletions
|
@ -4,14 +4,14 @@ let x: string | number;
|
|||
if (typeof x === "string") {
|
||||
let n = class {
|
||||
constructor() {
|
||||
x; // Should be "string"
|
||||
let y: string = x;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
let m = class {
|
||||
constructor() {
|
||||
x; // Should be "number"
|
||||
let y: number = x;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ var x;
|
|||
if (typeof x === "string") {
|
||||
var n = (function () {
|
||||
function class_1() {
|
||||
x; // Should be "string"
|
||||
var y = x;
|
||||
}
|
||||
return class_1;
|
||||
})();
|
||||
|
@ -30,7 +30,7 @@ if (typeof x === "string") {
|
|||
else {
|
||||
var m = (function () {
|
||||
function class_2() {
|
||||
x; // Should be "number"
|
||||
var y = x;
|
||||
}
|
||||
return class_2;
|
||||
})();
|
||||
|
|
|
@ -9,7 +9,8 @@ if (typeof x === "string") {
|
|||
>n : Symbol(n, Decl(typeGuardInClass.ts, 3, 7))
|
||||
|
||||
constructor() {
|
||||
x; // Should be "string"
|
||||
let y: string = x;
|
||||
>y : Symbol(y, Decl(typeGuardInClass.ts, 5, 15))
|
||||
>x : Symbol(x, Decl(typeGuardInClass.ts, 0, 3))
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +20,8 @@ else {
|
|||
>m : Symbol(m, Decl(typeGuardInClass.ts, 10, 7))
|
||||
|
||||
constructor() {
|
||||
x; // Should be "number"
|
||||
let y: number = x;
|
||||
>y : Symbol(y, Decl(typeGuardInClass.ts, 12, 15))
|
||||
>x : Symbol(x, Decl(typeGuardInClass.ts, 0, 3))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,10 +10,11 @@ if (typeof x === "string") {
|
|||
|
||||
let n = class {
|
||||
>n : typeof (Anonymous class)
|
||||
>class { constructor() { x; // Should be "string" } } : typeof (Anonymous class)
|
||||
>class { constructor() { let y: string = x; } } : typeof (Anonymous class)
|
||||
|
||||
constructor() {
|
||||
x; // Should be "string"
|
||||
let y: string = x;
|
||||
>y : string
|
||||
>x : string
|
||||
}
|
||||
}
|
||||
|
@ -21,10 +22,11 @@ if (typeof x === "string") {
|
|||
else {
|
||||
let m = class {
|
||||
>m : typeof (Anonymous class)
|
||||
>class { constructor() { x; // Should be "number" } } : typeof (Anonymous class)
|
||||
>class { constructor() { let y: number = x; } } : typeof (Anonymous class)
|
||||
|
||||
constructor() {
|
||||
x; // Should be "number"
|
||||
let y: number = x;
|
||||
>y : number
|
||||
>x : number
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,14 +3,14 @@ let x: string | number;
|
|||
if (typeof x === "string") {
|
||||
let n = class {
|
||||
constructor() {
|
||||
x; // Should be "string"
|
||||
let y: string = x;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
let m = class {
|
||||
constructor() {
|
||||
x; // Should be "number"
|
||||
let y: number = x;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue