mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Fixed extension method issues where 'this' type is missing
This commit is contained in:
parent
1b19eeb96e
commit
d976ea77e9
1 changed files with 2 additions and 2 deletions
|
@ -425,7 +425,7 @@ BfMethodDef* BfDefBuilder::CreateMethodDef(BfMethodDeclaration* methodDeclaratio
|
|||
methodDef->mIsExtern = methodDeclaration->mExternSpecifier != NULL;
|
||||
methodDef->mBody = methodDeclaration->mBody;
|
||||
|
||||
if (methodDeclaration->mThisToken != NULL)
|
||||
if ((methodDeclaration->mThisToken != NULL) && (!methodDeclaration->mParams.IsEmpty()))
|
||||
methodDef->mMethodType = BfMethodType_Extension;
|
||||
|
||||
HashContext signatureHashCtx;
|
||||
|
@ -589,7 +589,7 @@ BfMethodDef* BfDefBuilder::CreateMethodDef(BfMethodDeclaration* methodDeclaratio
|
|||
methodDef->mName = methodDeclaration->mNameNode->ToString();
|
||||
methodDef->mMethodType = BfMethodType_Normal;
|
||||
|
||||
if (methodDeclaration->mThisToken != NULL)
|
||||
if ((methodDeclaration->mThisToken != NULL) && (!methodDeclaration->mParams.IsEmpty()))
|
||||
{
|
||||
methodDef->mMethodType = BfMethodType_Extension;
|
||||
mCurTypeDef->mHasExtensionMethods = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue