Respond to PR comments

This commit is contained in:
Andy Hanson 2016-06-23 12:08:18 -07:00
parent 62607722d4
commit 89c992a8a1

View File

@ -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));