Lines Matching defs:scriptFunc
124 auto *scriptFunc = node->Function();
126 if (scriptFunc->ReturnTypeAnnotation() == nullptr) {
127 checker->LogTypeError("'Native' method should have explicit return type", scriptFunc->Start());
130 ASSERT(!scriptFunc->IsGetter() && !scriptFunc->IsSetter());
134 if (scriptFunc->ReturnTypeAnnotation() != nullptr) {
135 auto *asyncFuncReturnType = scriptFunc->Signature()->ReturnType();
139 checker->LogTypeError("Return type of async function must be 'Promise'.", scriptFunc->Start());
140 scriptFunc->Signature()->SetReturnType(checker->GlobalTypeError());
155 auto *scriptFunc = node->Function();
157 if (scriptFunc == nullptr) {
163 if (scriptFunc->IsProxy()) {
168 if (!scriptFunc->HasBody() && !(node->IsAbstract() || node->IsNative() || node->IsDeclare() ||
170 checker->LogTypeError("Only abstract or native methods can't have body.", scriptFunc->Start());
175 if (scriptFunc->ReturnTypeAnnotation() == nullptr &&
177 checker->LogTypeError("Native and Declare methods should have explicit return type.", scriptFunc->Start());
188 DoBodyTypeChecking(checker, node, scriptFunc);
189 CheckPredefinedMethodReturnType(checker, scriptFunc);
203 if (scriptFunc->IsRethrowing()) {
204 checker->CheckRethrowingFunction(scriptFunc);