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)
|
||||
autoComplete->CheckLocalRef(identifierNode, varDecl);
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -13684,7 +13684,7 @@ void BfExprEvaluator::InjectMixin(BfAstNode* targetSrc, BfTypedValue target, boo
|
|||
}
|
||||
|
||||
argExprEvaluatorItr = argExprEvaluators.begin();
|
||||
for ( ; localIdx < endLocalIdx; localIdx++)
|
||||
for (; localIdx < endLocalIdx; localIdx++)
|
||||
{
|
||||
auto exprEvaluator = *argExprEvaluatorItr;
|
||||
BfLocalVariable* localVar = curMethodState->mLocals[localIdx];
|
||||
|
|
|
@ -1118,6 +1118,11 @@ public:
|
|||
return mMixinState->mLocalsStartIdx;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool IsTemporary()
|
||||
{
|
||||
return mTempKind != TempKind_None;
|
||||
}
|
||||
};
|
||||
|
||||
class BfDeferredMethodCallData;
|
||||
|
|
|
@ -3400,6 +3400,7 @@ bool BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
|
|||
return true;
|
||||
|
||||
disableYield.Release();
|
||||
prevTypeState.Restore();
|
||||
|
||||
if (canDoMethodProcessing)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue