1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

merge master

This commit is contained in:
EinBurgbauer 2021-05-20 19:40:53 +02:00
commit 65df810d41
14 changed files with 109 additions and 35 deletions

View file

@ -1208,7 +1208,8 @@ 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;
@ -1223,13 +1224,25 @@ void BfMethodInstance::GetIRFunctionInfo(BfModule* module, BfIRType& returnType,
else
{
if (HasExplicitThis())
{
checkType = GetParamType(0);
//TODO(BCF): Breaks tests
//hasExplicitThis = true;
}
else
checkType = GetOwner();
}
}
else
{
if (hasExplicitThis)
{
// We already looked at this
hasExplicitThis = false;
continue;
}
checkType = GetParamType(paramIdx);
}