Lines Matching refs:argument

96     // Check if the type parameter is in the signature, and the type argument is not already in the return vector
313 bool ETSChecker::CheckOptionalLambdaFunction(ir::Expression *argument, Signature *substitutedSig, std::size_t index)
315 if (argument->IsArrowFunctionExpression()) {
316 auto *const arrowFuncExpr = argument->AsArrowFunctionExpression();
344 auto &argument = arguments[index];
346 if (argument->IsObjectExpression()) {
348 // No chance to check the argument at this point
354 if (argument->IsMemberExpression()) {
357 } else if (argument->IsSpreadElement()) {
359 LogTypeError("Spread argument cannot be passed for ordinary parameter.", argument->Start());
365 ASSERT(argument->IsArrowFunctionExpression());
366 auto *const arrowFuncExpr = argument->AsArrowFunctionExpression();
374 if (argument->IsArrayExpression()) {
375 argument->AsArrayExpression()->GetPrefferedTypeFromFuncParam(
379 if (!CheckInvokable(substitutedSig, argument, index, flags)) {
383 if (argument->IsIdentifier() && ValidateArgumentAsIdentifier(argument->AsIdentifier())) {
384 LogTypeError("Class name can't be the argument of function or method.", argument->Start());
390 substitutedSig, argument,
400 bool ETSChecker::CheckInvokable(Signature *substitutedSig, ir::Expression *argument, std::size_t index,
403 auto *argumentType = argument->Check(this);
407 checker::InvocationContext(Relation(), argument, argumentType, targetType, argument->Start(),
411 return invocationCtx.IsInvocable() || CheckOptionalLambdaFunction(argument, substitutedSig, index);
414 bool ETSChecker::ValidateSignatureInvocationContext(Signature *substitutedSig, ir::Expression *argument,
417 Type *argumentType = argument->Check(this);
419 Relation(), argument, argumentType, substitutedSig->Params()[index]->TsType(), argument->Start(),
422 return CheckOptionalLambdaFunction(argument, substitutedSig, index);
437 auto &argument = arguments[index];
439 if (!argument->IsSpreadElement()) {
440 auto *const argumentType = argument->Check(this);
445 Relation(), argument, argumentType,
446 substitutedSig->RestVar()->TsType()->AsETSArrayType()->ElementType(), argument->Start(),
458 LogTypeError("Spread argument for the rest parameter can be only one.", argument->Start());
463 auto *const restArgument = argument->AsSpreadElement()->Argument();
469 Relation(), restArgument, argumentType, substitutedSig->RestVar()->TsType(), argument->Start(),
921 // If there are multiple rest parameter signatures with different argument types, throw error
1274 LogTypeError("0 or 1 argument are allowed", func->Start());
1287 LogTypeError("Only 'string[]' type argument is allowed.", param->Start());