mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-12 13:24:09 +02:00
Removed invalid undef return
This commit is contained in:
parent
7cd16974b1
commit
bfb5435ce3
1 changed files with 3 additions and 2 deletions
|
@ -5473,6 +5473,7 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, BfMethodInstance*
|
||||||
auto constRet = mModule->mCompiler->mCEMachine->Call(targetSrc, mModule, methodInstance, irArgs, evalFlags, mExpectingType);
|
auto constRet = mModule->mCompiler->mCEMachine->Call(targetSrc, mModule, methodInstance, irArgs, evalFlags, mExpectingType);
|
||||||
if (constRet)
|
if (constRet)
|
||||||
{
|
{
|
||||||
|
auto constant = mModule->mBfIRBuilder->GetConstant(constRet.mValue);
|
||||||
BF_ASSERT(!constRet.mType->IsVar());
|
BF_ASSERT(!constRet.mType->IsVar());
|
||||||
return constRet;
|
return constRet;
|
||||||
}
|
}
|
||||||
|
@ -5519,7 +5520,7 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, BfMethodInstance*
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return mModule->GetDefaultTypedValue(returnType, true, BfDefaultValueKind_Undef);
|
return mModule->GetDefaultTypedValue(returnType, true, BfDefaultValueKind_Addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return _GetDefaultReturnValue();
|
return _GetDefaultReturnValue();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue