From 89c992a8a1ff23575306ab4a96653fd165535eee Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Thu, 23 Jun 2016 12:08:18 -0700 Subject: [PATCH] Respond to PR comments --- src/compiler/checker.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 36a26abe393..eb4545c6810 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3202,8 +3202,8 @@ namespace ts { return parameter && parameter.symbol; } - function getAnnotatedAccessorThisType(accessor: AccessorDeclaration): Type | undefined { - return getThisTypeOfSignature(getSignatureFromDeclaration(accessor)); + function getThisTypeOfDeclaration(declaration: SignatureDeclaration): Type | undefined { + return getThisTypeOfSignature(getSignatureFromDeclaration(declaration)); } function getTypeOfAccessors(symbol: Symbol): Type { @@ -8603,7 +8603,7 @@ namespace ts { return type; } - const thisType = getThisTypeOfSignature(getSignatureFromDeclaration(container)); + const thisType = getThisTypeOfDeclaration(container); if (thisType) { return thisType; } @@ -13500,7 +13500,7 @@ namespace ts { // TypeScript 1.0 spec (April 2014): 4.5 // If both accessors include type annotations, the specified types must be identical. checkAccessorDeclarationTypesIdentical(node, otherAccessor, getAnnotatedAccessorType, Diagnostics.get_and_set_accessor_must_have_the_same_type); - checkAccessorDeclarationTypesIdentical(node, otherAccessor, getAnnotatedAccessorThisType, Diagnostics.get_and_set_accessor_must_have_the_same_this_type); + checkAccessorDeclarationTypesIdentical(node, otherAccessor, getThisTypeOfDeclaration, Diagnostics.get_and_set_accessor_must_have_the_same_this_type); } } getTypeOfAccessors(getSymbolOfNode(node));