mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Protect against invalid fixit for adding method
This commit is contained in:
parent
be093b6bde
commit
c34e6fe66a
1 changed files with 9 additions and 7 deletions
|
@ -7529,15 +7529,17 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp
|
|||
if (targetType != NULL)
|
||||
{
|
||||
auto typeInst = targetType->ToTypeInstance();
|
||||
|
||||
BfTypeVector paramTypes;
|
||||
for (int argIdx = 0; argIdx < (int)argValues.mResolvedArgs.size(); argIdx++)
|
||||
if ((targetType != NULL) && (!methodName.IsEmpty()))
|
||||
{
|
||||
auto& resolvedArg = argValues.mResolvedArgs[argIdx];
|
||||
paramTypes.Add(resolvedArg.mTypedValue.mType);
|
||||
}
|
||||
BfTypeVector paramTypes;
|
||||
for (int argIdx = 0; argIdx < (int)argValues.mResolvedArgs.size(); argIdx++)
|
||||
{
|
||||
auto& resolvedArg = argValues.mResolvedArgs[argIdx];
|
||||
paramTypes.Add(resolvedArg.mTypedValue.mType);
|
||||
}
|
||||
|
||||
autoComplete->FixitAddMethod(typeInst, methodName, mExpectingType, paramTypes, wantStatic);
|
||||
autoComplete->FixitAddMethod(typeInst, methodName, mExpectingType, paramTypes, wantStatic);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue