1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Made method mutability part of signature and method selection

This commit is contained in:
Brian Fiete 2020-08-29 14:18:05 -07:00
parent f795215b44
commit c49d92b779
7 changed files with 129 additions and 14 deletions

View file

@ -11385,7 +11385,7 @@ bool BfModule::CompareMethodSignatures(BfMethodInstance* methodA, BfMethodInstan
else if (methodA->mMethodDef->mName != methodB->mMethodDef->mName)
return false;
if (methodA->mMethodDef->mCheckedKind != methodB->mMethodDef->mCheckedKind)
return false;
return false;
if ((methodA->mMethodDef->mMethodType == BfMethodType_Mixin) != (methodB->mMethodDef->mMethodType == BfMethodType_Mixin))
return false;
@ -20846,6 +20846,7 @@ void BfModule::DoMethodDeclaration(BfMethodDeclaration* methodDeclaration, bool
if (((checkMethodInstance->mChainType == BfMethodChainType_None) || (checkMethodInstance->mChainType == BfMethodChainType_ChainHead)) &&
(checkMethodInstance->GetExplicitInterface() == methodInstance->GetExplicitInterface()) &&
(checkMethod->mIsMutating == methodDef->mIsMutating) &&
(CompareMethodSignatures(checkMethodInstance, mCurMethodInstance)))
{
bool canChain = false;