mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-16 15:24:10 +02:00
Fixes for mixins in const exprs
This commit is contained in:
parent
98d0b90789
commit
63dc33a970
3 changed files with 13 additions and 7 deletions
|
@ -3181,7 +3181,7 @@ BfTypedValue BfExprEvaluator::LookupIdentifier(BfAstNode* refNode, const StringI
|
||||||
if (autoComplete != NULL)
|
if (autoComplete != NULL)
|
||||||
autoComplete->CheckLocalRef(identifierNode, varDecl);
|
autoComplete->CheckLocalRef(identifierNode, varDecl);
|
||||||
if (((mModule->mCurMethodState->mClosureState == NULL) || (mModule->mCurMethodState->mClosureState->mCapturing)) &&
|
if (((mModule->mCurMethodState->mClosureState == NULL) || (mModule->mCurMethodState->mClosureState->mCapturing)) &&
|
||||||
(mModule->mCompiler->mResolvePassData != NULL) && (mModule->mCurMethodInstance != NULL))
|
(mModule->mCompiler->mResolvePassData != NULL) && (mModule->mCurMethodInstance != NULL) && (!mModule->mCurMethodState->IsTemporary()))
|
||||||
mModule->mCompiler->mResolvePassData->HandleLocalReference(identifierNode, varDecl->mNameNode, mModule->mCurTypeInstance->mTypeDef, rootMethodState->mMethodInstance->mMethodDef, varDecl->mLocalVarId);
|
mModule->mCompiler->mResolvePassData->HandleLocalReference(identifierNode, varDecl->mNameNode, mModule->mCurTypeInstance->mTypeDef, rootMethodState->mMethodInstance->mMethodDef, varDecl->mLocalVarId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1118,6 +1118,11 @@ public:
|
||||||
return mMixinState->mLocalsStartIdx;
|
return mMixinState->mLocalsStartIdx;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsTemporary()
|
||||||
|
{
|
||||||
|
return mTempKind != TempKind_None;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class BfDeferredMethodCallData;
|
class BfDeferredMethodCallData;
|
||||||
|
|
|
@ -3400,6 +3400,7 @@ bool BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
disableYield.Release();
|
disableYield.Release();
|
||||||
|
prevTypeState.Restore();
|
||||||
|
|
||||||
if (canDoMethodProcessing)
|
if (canDoMethodProcessing)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue