diff --git a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.symbols b/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.symbols deleted file mode 100644 index 7988b7196ef..00000000000 --- a/tests/baselines/reference/typeGuardOfFormTypeOfNotEqualHasNoEffect.symbols +++ /dev/null @@ -1,70 +0,0 @@ -=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts === -class C { private p: string }; ->C : Symbol(C, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 0, 0)) ->p : Symbol(C.p, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 0, 9)) - -var strOrNum: string | number; ->strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 2, 3)) - -var strOrBool: string | boolean; ->strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 3, 3)) - -var numOrBool: number | boolean ->numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 4, 3)) - -var strOrC: string | C; ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 5, 3)) ->C : Symbol(C, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 0, 0)) - -// typeof x != s has not effect on typeguard -if (typeof strOrNum != "string") { ->strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 2, 3)) - - var r1 = strOrNum; // string | number ->r1 : Symbol(r1, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 9, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 12, 7)) ->strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 2, 3)) -} -else { - var r1 = strOrNum; // string | number ->r1 : Symbol(r1, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 9, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 12, 7)) ->strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 2, 3)) -} - -if (typeof strOrBool != "boolean") { ->strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 3, 3)) - - var r2 = strOrBool; // string | boolean ->r2 : Symbol(r2, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 16, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 19, 7)) ->strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 3, 3)) -} -else { - var r2 = strOrBool; // string | boolean ->r2 : Symbol(r2, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 16, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 19, 7)) ->strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 3, 3)) -} - -if (typeof numOrBool != "number") { ->numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 4, 3)) - - var r3 = numOrBool; // number | boolean ->r3 : Symbol(r3, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 23, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 26, 7)) ->numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 4, 3)) -} -else { - var r3 = numOrBool; // number | boolean ->r3 : Symbol(r3, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 23, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 26, 7)) ->numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 4, 3)) -} - -if (typeof strOrC != "Object") { ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 5, 3)) - - var r4 = strOrC; // string | C ->r4 : Symbol(r4, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 30, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 33, 7)) ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 5, 3)) -} -else { - var r4 = strOrC; // string | C ->r4 : Symbol(r4, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 30, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 33, 7)) ->strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 5, 3)) -} diff --git a/tests/baselines/reference/typeGuardsOnClassProperty.symbols b/tests/baselines/reference/typeGuardsOnClassProperty.symbols index f82df71e46a..5017c442b2f 100644 --- a/tests/baselines/reference/typeGuardsOnClassProperty.symbols +++ b/tests/baselines/reference/typeGuardsOnClassProperty.symbols @@ -8,16 +8,16 @@ class D { >D : Symbol(D, Decl(typeGuardsOnClassProperty.ts, 0, 0)) data: string | string[]; ->data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) +>data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) getData() { ->getData : Symbol(getData, Decl(typeGuardsOnClassProperty.ts, 6, 28)) +>getData : Symbol(D.getData, Decl(typeGuardsOnClassProperty.ts, 6, 28)) var data = this.data; >data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 8, 11)) ->this.data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) +>this.data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) >this : Symbol(D, Decl(typeGuardsOnClassProperty.ts, 0, 0)) ->data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) +>data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) return typeof data === "string" ? data : data.join(" "); >data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 8, 11)) @@ -28,19 +28,19 @@ class D { } getData1() { ->getData1 : Symbol(getData1, Decl(typeGuardsOnClassProperty.ts, 10, 5)) +>getData1 : Symbol(D.getData1, Decl(typeGuardsOnClassProperty.ts, 10, 5)) return typeof this.data === "string" ? this.data : this.data.join(" "); ->this.data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) +>this.data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) >this : Symbol(D, Decl(typeGuardsOnClassProperty.ts, 0, 0)) ->data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) ->this.data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) +>data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) +>this.data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) >this : Symbol(D, Decl(typeGuardsOnClassProperty.ts, 0, 0)) ->data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) +>data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) >this.data.join : Symbol(Array.join, Decl(lib.d.ts, --, --)) ->this.data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) +>this.data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) >this : Symbol(D, Decl(typeGuardsOnClassProperty.ts, 0, 0)) ->data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) +>data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9)) >join : Symbol(Array.join, Decl(lib.d.ts, --, --)) } }