mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Fixed 'ref' and 'in' this parameter for extension methods
This commit is contained in:
parent
0d15b28bd3
commit
a1cd01cd3d
4 changed files with 43 additions and 1 deletions
|
@ -426,7 +426,14 @@ BfMethodDef* BfDefBuilder::CreateMethodDef(BfMethodDeclaration* methodDeclaratio
|
|||
methodDef->mBody = methodDeclaration->mBody;
|
||||
|
||||
if ((methodDeclaration->mThisToken != NULL) && (!methodDeclaration->mParams.IsEmpty()))
|
||||
{
|
||||
methodDef->mMethodType = BfMethodType_Extension;
|
||||
if (!methodDef->mIsStatic)
|
||||
{
|
||||
methodDef->mIsStatic = true;
|
||||
Fail("Extension methods must be declared 'static'", methodDef->GetRefNode());
|
||||
}
|
||||
}
|
||||
|
||||
HashContext signatureHashCtx;
|
||||
HashNode(signatureHashCtx, methodDeclaration, methodDef->mBody);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue