Lines Matching refs:extensionFunc
21 ir::ScriptFunction *extensionFunc, checker::Signature *signature)
23 const auto methodName = extensionFunc->Id()->Name();
39 extensionFunc->Body()->Start());
45 ir::ScriptFunction *extensionFunc, checker::Signature *signature)
51 CheckExtensionIsShadowedInCurrentClassOrInterface(checker, objType, extensionFunc, signature);
54 CheckExtensionIsShadowedByMethod(checker, interface, extensionFunc, signature);
57 CheckExtensionIsShadowedByMethod(checker, objType->SuperType(), extensionFunc, signature);
60 static void ReplaceThisInExtensionMethod(checker::ETSChecker *checker, ir::ScriptFunction *extensionFunc)
62 ASSERT(!extensionFunc->Params().empty());
63 ASSERT(extensionFunc->Params()[0]->AsETSParameterExpression()->Ident()->Name() ==
65 auto thisVariable = extensionFunc->Params()[0]->Variable();
66 extensionFunc->Body()->TransformChildrenRecursively(
80 void CheckExtensionMethod(checker::ETSChecker *checker, ir::ScriptFunction *extensionFunc, ir::MethodDefinition *node)
82 auto *const classType = checker->GetApparentType(extensionFunc->Signature()->Params()[0]->TsType());
94 ReplaceThisInExtensionMethod(checker, extensionFunc);
97 extensionFunc->Signature()->GetSignatureInfo(), checker->Allocator());
101 checker->CreateSignature(originalExtensionSigInfo, extensionFunc->Signature()->ReturnType(), extensionFunc);
103 CheckExtensionIsShadowedByMethod(checker, classType->AsETSObjectType(), extensionFunc, originalExtensionSigature);