@@ -17922,27 +17922,27 @@ namespace ts {
17922
17922
17923
17923
if (func.kind === SyntaxKind.SetAccessor) {
17924
17924
if (node.expression) {
17925
- error(node.expression , Diagnostics.Setters_cannot_return_a_value);
17925
+ error(node, Diagnostics.Setters_cannot_return_a_value);
17926
17926
}
17927
17927
}
17928
17928
else if (func.kind === SyntaxKind.Constructor) {
17929
- if (node.expression && !checkTypeAssignableTo(exprType, returnType, node.expression )) {
17930
- error(node.expression , Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);
17929
+ if (node.expression && !checkTypeAssignableTo(exprType, returnType, node)) {
17930
+ error(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);
17931
17931
}
17932
17932
}
17933
17933
else if (func.type || isGetAccessorWithAnnotatedSetAccessor(func)) {
17934
17934
if (isAsyncFunctionLike(func)) {
17935
17935
const promisedType = getPromisedType(returnType);
17936
- const awaitedType = checkAwaitedType(exprType, node.expression || node , Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
17936
+ const awaitedType = checkAwaitedType(exprType, node, Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);
17937
17937
if (promisedType) {
17938
17938
// If the function has a return type, but promisedType is
17939
17939
// undefined, an error will be reported in checkAsyncFunctionReturnType
17940
17940
// so we don't need to report one here.
17941
- checkTypeAssignableTo(awaitedType, promisedType, node.expression || node );
17941
+ checkTypeAssignableTo(awaitedType, promisedType, node);
17942
17942
}
17943
17943
}
17944
17944
else {
17945
- checkTypeAssignableTo(exprType, returnType, node.expression || node );
17945
+ checkTypeAssignableTo(exprType, returnType, node);
17946
17946
}
17947
17947
}
17948
17948
}
0 commit comments