1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fixed nested local method skipping during resolution

This commit is contained in:
Brian Fiete 2022-07-28 06:52:52 -04:00
parent 1c7b7df25f
commit e247e3ecb4

View file

@ -3507,7 +3507,12 @@ void BfModule::VisitCodeBlock(BfBlock* block)
BfLocalMethod* localMethod = mCurMethodState->mLocalMethods[curLocalMethodIdx];
BF_ASSERT(localMethod->mMethodDeclaration == localMethodDecl->mMethodDeclaration);
if ((wantsAllLocalMethods) || (autoComplete->IsAutocompleteNode(localMethod->mMethodDeclaration)))
bool wantsLocalMethod = (wantsAllLocalMethods) || (autoComplete->IsAutocompleteNode(localMethod->mMethodDeclaration));
if ((!wantsLocalMethod) && (mCurMethodInstance->mMethodDef->mIsLocalMethod))
wantsLocalMethod = true;
if (wantsLocalMethod)
{
if (!mCurMethodInstance->IsSpecializedGenericMethodOrType())
GetLocalMethodInstance(localMethod, BfTypeVector(), NULL, true); // Only necessary on unspecialized pass