1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Support for 'params' in indexer

This commit is contained in:
Brian Fiete 2021-11-15 15:01:48 -08:00
parent 7dbd5294d7
commit f58362343b
5 changed files with 87 additions and 122 deletions

View file

@ -22354,7 +22354,7 @@ void BfModule::DoMethodDeclaration(BfMethodDeclaration* methodDeclaration, bool
mCurMethodInstance->mDefaultValues.Add(defaultValue);
}
}
}
}
if ((paramDef != NULL) && (paramDef->mParamKind == BfParamKind_Params))
{
@ -22444,10 +22444,10 @@ void BfModule::DoMethodDeclaration(BfMethodDeclaration* methodDeclaration, bool
methodParam.mResolvedType = resolvedParamType;
methodParam.mParamDefIdx = paramDefIdx;
mCurMethodInstance->mParams.push_back(methodParam);
}
}
if (paramDefIdx < (int)methodDef->mParams.size() - 1)
{
{
Fail("Only the last parameter can specify 'params'", paramDef->mParamDeclaration->mModToken);
}
}