1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

"this" colorization fix

This commit is contained in:
Brian Fiete 2025-03-18 06:10:36 -04:00
parent b010449c22
commit cf27fffade

View file

@ -4670,7 +4670,7 @@ BfTypedValue BfExprEvaluator::LookupIdentifier(BfAstNode* refNode, const StringI
mModule->Fail("Local variable is not captured", refNode);
}
if ((varSkipCountLeft == 0) && (varDecl != NULL) && (!varDecl->mIsThis))
if ((varSkipCountLeft == 0) && (varDecl != NULL))
{
if ((closureTypeInst != NULL) && (wantName == "this"))
break;
@ -4684,6 +4684,7 @@ BfTypedValue BfExprEvaluator::LookupIdentifier(BfAstNode* refNode, const StringI
}
}
if (!varDecl->mIsThis)
mModule->SetElementType(identifierNode, (varDecl->IsParam()) ? BfSourceElementType_Parameter : BfSourceElementType_Local);
BfTypedValue localResult = LoadLocal(varDecl);