mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixed parameter error with failed inline const constraint
This commit is contained in:
parent
94adbe1548
commit
a240acc674
1 changed files with 12 additions and 1 deletions
|
@ -21706,7 +21706,12 @@ void BfModule::ProcessMethod(BfMethodInstance* methodInstance, bool isInlineDup,
|
||||||
BfLocalVariable* paramVar = NULL;
|
BfLocalVariable* paramVar = NULL;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
BF_ASSERT(localIdx < methodState.mLocals.size());
|
if (localIdx >= methodState.mLocals.size())
|
||||||
|
{
|
||||||
|
paramVar = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
paramVar = methodState.mLocals[localIdx];
|
paramVar = methodState.mLocals[localIdx];
|
||||||
if ((paramVar->mCompositeCount == -1) &&
|
if ((paramVar->mCompositeCount == -1) &&
|
||||||
(!paramVar->mIsConst) &&
|
(!paramVar->mIsConst) &&
|
||||||
|
@ -21715,6 +21720,12 @@ void BfModule::ProcessMethod(BfMethodInstance* methodInstance, bool isInlineDup,
|
||||||
localIdx++;
|
localIdx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (paramVar == NULL)
|
||||||
|
{
|
||||||
|
Fail("Parameter count error", methodDef->GetRefNode());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if ((isThis) && (mCurTypeInstance->IsValueType()) && (methodDef->mMethodType != BfMethodType_Ctor) && (!methodDef->HasNoThisSplat()))
|
if ((isThis) && (mCurTypeInstance->IsValueType()) && (methodDef->mMethodType != BfMethodType_Ctor) && (!methodDef->HasNoThisSplat()))
|
||||||
{
|
{
|
||||||
paramVar->mIsReadOnly = true;
|
paramVar->mIsReadOnly = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue