File tree Expand file tree Collapse file tree
tests/baselines/reference Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9795,7 +9795,7 @@ namespace ts {
97959795 }
97969796
97979797 const propType = getTypeOfSymbol(prop);
9798- if (node.kind !== SyntaxKind.PropertyAccessExpression || !(prop.flags & (SymbolFlags.Variable | SymbolFlags.Property)) || isAssignmentTarget(node)) {
9798+ if (node.kind !== SyntaxKind.PropertyAccessExpression || !(prop.flags & (SymbolFlags.Variable | SymbolFlags.Property | SymbolFlags.Accessor )) || isAssignmentTarget(node)) {
97999799 return propType;
98009800 }
98019801 const leftmostNode = getLeftmostIdentifierOrThis(node);
Original file line number Diff line number Diff line change @@ -57,18 +57,18 @@ class C1 {
5757>pp2 : string
5858
5959 strOrNum = typeof this.pp3 === "string" && this.pp3; // string | number
60- >strOrNum = typeof this.pp3 === "string" && this.pp3 : string | number
60+ >strOrNum = typeof this.pp3 === "string" && this.pp3 : string
6161>strOrNum : string | number
62- >typeof this.pp3 === "string" && this.pp3 : string | number
62+ >typeof this.pp3 === "string" && this.pp3 : string
6363>typeof this.pp3 === "string" : boolean
6464>typeof this.pp3 : string
6565>this.pp3 : string | number
6666>this : this
6767>pp3 : string | number
6868>"string" : string
69- >this.pp3 : string | number
69+ >this.pp3 : string
7070>this : this
71- >pp3 : string | number
71+ >pp3 : string
7272 }
7373}
7474var c1: C1;
@@ -90,18 +90,18 @@ strOrNum = typeof c1.pp2 === "string" && c1.pp2; // string | number
9090>pp2 : string
9191
9292strOrNum = typeof c1.pp3 === "string" && c1.pp3; // string | number
93- >strOrNum = typeof c1.pp3 === "string" && c1.pp3 : string | number
93+ >strOrNum = typeof c1.pp3 === "string" && c1.pp3 : string
9494>strOrNum : string | number
95- >typeof c1.pp3 === "string" && c1.pp3 : string | number
95+ >typeof c1.pp3 === "string" && c1.pp3 : string
9696>typeof c1.pp3 === "string" : boolean
9797>typeof c1.pp3 : string
9898>c1.pp3 : string | number
9999>c1 : C1
100100>pp3 : string | number
101101>"string" : string
102- >c1.pp3 : string | number
102+ >c1.pp3 : string
103103>c1 : C1
104- >pp3 : string | number
104+ >pp3 : string
105105
106106var obj1: {
107107>obj1 : { x: string | number; }
Original file line number Diff line number Diff line change @@ -172,16 +172,16 @@ strOrNum = typeof obj1.method(strOrNum) === "string" && obj1.method(strOrNum);
172172
173173// accessing getter property
174174strOrNum = typeof obj1.prop === "string" && obj1.prop;
175- >strOrNum = typeof obj1.prop === "string" && obj1.prop : string | number
175+ >strOrNum = typeof obj1.prop === "string" && obj1.prop : string
176176>strOrNum : string | number
177- >typeof obj1.prop === "string" && obj1.prop : string | number
177+ >typeof obj1.prop === "string" && obj1.prop : string
178178>typeof obj1.prop === "string" : boolean
179179>typeof obj1.prop : string
180180>obj1.prop : string | number
181181>obj1 : { method(param: string | number): string | number; prop: string | number; }
182182>prop : string | number
183183>"string" : string
184- >obj1.prop : string | number
184+ >obj1.prop : string
185185>obj1 : { method(param: string | number): string | number; prop: string | number; }
186- >prop : string | number
186+ >prop : string
187187
You can’t perform that action at this time.
0 commit comments