mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +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;
|
||||
while (true)
|
||||
{
|
||||
BF_ASSERT(localIdx < methodState.mLocals.size());
|
||||
if (localIdx >= methodState.mLocals.size())
|
||||
{
|
||||
paramVar = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
paramVar = methodState.mLocals[localIdx];
|
||||
if ((paramVar->mCompositeCount == -1) &&
|
||||
(!paramVar->mIsConst) &&
|
||||
|
@ -21715,6 +21720,12 @@ void BfModule::ProcessMethod(BfMethodInstance* methodInstance, bool isInlineDup,
|
|||
localIdx++;
|
||||
}
|
||||
|
||||
if (paramVar == NULL)
|
||||
{
|
||||
Fail("Parameter count error", methodDef->GetRefNode());
|
||||
break;
|
||||
}
|
||||
|
||||
if ((isThis) && (mCurTypeInstance->IsValueType()) && (methodDef->mMethodType != BfMethodType_Ctor) && (!methodDef->HasNoThisSplat()))
|
||||
{
|
||||
paramVar->mIsReadOnly = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue