mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
Fixed crash with embedded aborted autocomplete methodInfo
This commit is contained in:
parent
4fe4bcc342
commit
fa3914e674
1 changed files with 3 additions and 14 deletions
|
@ -11847,15 +11847,11 @@ void BfExprEvaluator::Visit(BfObjectCreateExpression* objCreateExpr)
|
|||
SetAndRestoreValue<BfFunctionBindResult*> prevBindResult(mFunctionBindResult, &bindResult);
|
||||
|
||||
BfIRValue appendSizeValue;
|
||||
//BfTypedValue emtpyThis(BfIRValue(), resolvedTypeRef, resolvedTypeRef->IsStruct());
|
||||
BfTypedValue emtpyThis(mModule->mBfIRBuilder->GetFakeVal(), resolvedTypeRef, resolvedTypeRef->IsStruct());
|
||||
|
||||
BfResolvedArgs argValues(objCreateExpr->mOpenToken, &objCreateExpr->mArguments, &objCreateExpr->mCommas, objCreateExpr->mCloseToken);
|
||||
ResolveArgValues(argValues, BfResolveArgFlag_DeferParamEval); ////
|
||||
|
||||
/*SetAndRestoreValue<BfAttributeState*> prevAttributeState(mModule->mAttributeState, mPrefixedAttributeState);
|
||||
if (mPrefixedAttributeState != NULL)
|
||||
mPrefixedAttributeState->mUsed = true;*/
|
||||
if (typeInstance == NULL)
|
||||
{
|
||||
// No CTOR needed
|
||||
|
@ -11871,8 +11867,8 @@ void BfExprEvaluator::Visit(BfObjectCreateExpression* objCreateExpr)
|
|||
MatchConstructor(objCreateExpr->mTypeRef, objCreateExpr, emtpyThis, typeInstance, argValues, false, true);
|
||||
if ((wasCapturingMethodInfo) && (!autoComplete->mIsCapturingMethodMatchInfo))
|
||||
{
|
||||
autoComplete->mIsCapturingMethodMatchInfo = true;
|
||||
BF_ASSERT(autoComplete->mMethodMatchInfo != NULL);
|
||||
if (autoComplete->mMethodMatchInfo != NULL)
|
||||
autoComplete->mIsCapturingMethodMatchInfo = true;
|
||||
}
|
||||
else
|
||||
autoComplete->mIsCapturingMethodMatchInfo = false;
|
||||
|
@ -11883,15 +11879,8 @@ void BfExprEvaluator::Visit(BfObjectCreateExpression* objCreateExpr)
|
|||
}
|
||||
mModule->ValidateAllocation(typeInstance, objCreateExpr->mTypeRef);
|
||||
|
||||
//prevAttributeState.Restore();
|
||||
prevBindResult.Restore();
|
||||
|
||||
/*if ((typeInstance != NULL) && (bindResult.mMethodInstance == NULL))
|
||||
{
|
||||
mModule->AssertErrorState();
|
||||
return;
|
||||
}*/
|
||||
|
||||
int allocAlign = resolvedTypeRef->mAlign;
|
||||
if (typeInstance != NULL)
|
||||
allocAlign = typeInstance->mInstAlign;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue