mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
proper fix
This commit is contained in:
parent
10c8196352
commit
954992b9d4
1 changed files with 2 additions and 14 deletions
|
@ -1209,7 +1209,6 @@ void BfMethodInstance::GetIRFunctionInfo(BfModule* module, BfIRType& returnType,
|
|||
returnType = module->mBfIRBuilder->MapType(mReturnType);
|
||||
}
|
||||
|
||||
bool hasExplicitThis = false;
|
||||
for (int paramIdx = -1; paramIdx < GetParamCount(); paramIdx++)
|
||||
{
|
||||
BfType* checkType = NULL;
|
||||
|
@ -1224,23 +1223,15 @@ void BfMethodInstance::GetIRFunctionInfo(BfModule* module, BfIRType& returnType,
|
|||
else
|
||||
{
|
||||
if (HasExplicitThis())
|
||||
{
|
||||
checkType = GetParamType(0);
|
||||
|
||||
hasExplicitThis = true;
|
||||
}
|
||||
else
|
||||
checkType = GetOwner();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hasExplicitThis && paramIdx == 0)
|
||||
{
|
||||
// We already looked at this
|
||||
hasExplicitThis = false;
|
||||
continue;
|
||||
}
|
||||
if ((paramIdx == 0) && (mMethodDef->mHasExplicitThis))
|
||||
continue; // Skip over the explicit 'this'
|
||||
|
||||
checkType = GetParamType(paramIdx);
|
||||
}
|
||||
|
@ -1354,9 +1345,6 @@ void BfMethodInstance::GetIRFunctionInfo(BfModule* module, BfIRType& returnType,
|
|||
|
||||
if (checkType2 != NULL)
|
||||
_AddType(checkType2);
|
||||
|
||||
if ((paramIdx == -1) && (mMethodDef->mHasExplicitThis))
|
||||
paramIdx++; // Skip over the explicit 'this'
|
||||
}
|
||||
|
||||
if ((!module->mIsComptimeModule) && (GetStructRetIdx(forceStatic) == 1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue