mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixed named parameters in extension methods
This commit is contained in:
parent
2e9174be8d
commit
e09b701e9f
1 changed files with 6 additions and 2 deletions
|
@ -666,9 +666,13 @@ void BfMethodDef::BuildParamNameMap()
|
|||
if (mParamNameMap != NULL)
|
||||
return;
|
||||
|
||||
int startIdx = 0;
|
||||
if (mMethodType == BfMethodType_Extension)
|
||||
startIdx = 1;
|
||||
|
||||
mParamNameMap = new Dictionary<StringView, int>();
|
||||
for (int i = 0; i < mParams.mSize; i++)
|
||||
(*mParamNameMap)[mParams[i]->mName] = i;
|
||||
for (int i = startIdx; i < mParams.mSize; i++)
|
||||
(*mParamNameMap)[mParams[i]->mName] = i - startIdx;
|
||||
}
|
||||
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue