Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reorder a bit
  • Loading branch information
weswigham committed Apr 30, 2024
commit e0b2467ec3c91a97b62b637fe80d99c1d23a6bab
4 changes: 2 additions & 2 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29258,9 +29258,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
return;
}
const right = isPropertyAccessExpression(location) ? location.name : location.right;
const assignmentKind = getAssignmentTargetKind(location);
const leftType = parentType || checkExpressionCached(left);
const apparentType = getApparentType(assignmentKind !== AssignmentKind.None || isMethodAccessForCall(location) ? getWidenedType(leftType) : leftType);
const parentSymbol = getNodeLinks(left).resolvedSymbol;
if (!parentSymbol || parentSymbol === unknownSymbol) {
return;
Expand All @@ -29286,6 +29284,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
let prop = propSymbol;
if (!prop && !parentType) {
const lexicallyScopedSymbol = isPrivateIdentifier(right) && lookupSymbolForPrivateIdentifierDeclaration(right.escapedText, right);
const assignmentKind = getAssignmentTargetKind(location);
const apparentType = getApparentType(assignmentKind !== AssignmentKind.None || isMethodAccessForCall(location) ? getWidenedType(leftType) : leftType);
prop = isPrivateIdentifier(right) ? lexicallyScopedSymbol && getPrivateIdentifierPropertyOfType(apparentType, lexicallyScopedSymbol) || undefined : getPropertyOfType(apparentType, right.escapedText);
}
if (
Expand Down