mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Nested this container (#36495)
* Add nestedThisContainer test * Fix #36492
This commit is contained in:
@@ -21144,7 +21144,7 @@ namespace ts {
|
||||
}
|
||||
// In an assignment of the form 'obj.xxx = function(...)' or 'obj[xxx] = function(...)', the
|
||||
// contextual type for 'this' is 'obj'.
|
||||
const parent = func.parent;
|
||||
const parent = walkUpParenthesizedExpressions(func.parent);
|
||||
if (parent.kind === SyntaxKind.BinaryExpression && (<BinaryExpression>parent).operatorToken.kind === SyntaxKind.EqualsToken) {
|
||||
const target = (<BinaryExpression>parent).left;
|
||||
if (isAccessExpression(target)) {
|
||||
|
||||
Reference in New Issue
Block a user