Skip to content

Commit

Permalink
Fixed GetMethodByName for methods in conditional extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
bfiete committed Jun 19, 2022
1 parent 4853163 commit 48571d3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions IDEHelper/Compiler/BfModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10827,10 +10827,14 @@ BfModuleMethodInstance BfModule::GetMethodByName(BfTypeInstance* typeInstance, c

while (methodDef != NULL)
{
if ((methodDef->mMethodType != BfMethodType_Mixin) &&
if ((methodDef->mMethodType != BfMethodType_Mixin) &&
(methodDef->mGenericParams.size() == 0) &&
((paramCount == -1) || (paramCount == (int)methodDef->mParams.size())))
return GetMethodInstanceAtIdx(typeInstance, methodDef->mIdx);
((paramCount == -1) || (paramCount == (int)methodDef->mParams.size())))
{
auto moduleMethodInstance = GetMethodInstanceAtIdx(typeInstance, methodDef->mIdx);
if (moduleMethodInstance)
return moduleMethodInstance;
}
methodDef = methodDef->mNextWithSameName;
}

Expand Down

0 comments on commit 48571d3

Please sign in to comment.