mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Fixed an issue using global variables in method attributes
This commit is contained in:
parent
1aa66761ad
commit
2e83062143
2 changed files with 3 additions and 1 deletions
|
@ -3148,7 +3148,7 @@ BfTypedValue BfExprEvaluator::LookupIdentifier(BfAstNode* refNode, const StringI
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!thisValue.HasType())
|
if (!thisValue.HasType())
|
||||||
thisValue = BfTypedValue(mModule->mCurTypeInstance);
|
thisValue = BfTypedValue(mModule->mCurTypeInstance);
|
||||||
BfTypedValue result = LookupField(identifierNode, thisValue, findName, BfLookupFieldFlag_IsImplicitThis);
|
BfTypedValue result = LookupField(identifierNode, thisValue, findName, BfLookupFieldFlag_IsImplicitThis);
|
||||||
if (mPropDef != NULL)
|
if (mPropDef != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18788,6 +18788,8 @@ void BfModule::GetMethodCustomAttributes(BfMethodInstance* methodInstance)
|
||||||
auto propertyMethodDeclaration = methodDef->GetPropertyMethodDeclaration();
|
auto propertyMethodDeclaration = methodDef->GetPropertyMethodDeclaration();
|
||||||
auto typeInstance = methodInstance->GetOwner();
|
auto typeInstance = methodInstance->GetOwner();
|
||||||
|
|
||||||
|
BfTypeState typeState(typeInstance);
|
||||||
|
SetAndRestoreValue<BfTypeState*> prevTypeState(mContext->mCurTypeState, &typeState);
|
||||||
SetAndRestoreValue<BfTypeInstance*> prevTypeInstance(mCurTypeInstance, typeInstance);
|
SetAndRestoreValue<BfTypeInstance*> prevTypeInstance(mCurTypeInstance, typeInstance);
|
||||||
SetAndRestoreValue<BfMethodInstance*> prevMethodInstance(mCurMethodInstance, methodInstance);
|
SetAndRestoreValue<BfMethodInstance*> prevMethodInstance(mCurMethodInstance, methodInstance);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue