1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Added error for 'readonly' on methods with non-ref return

This commit is contained in:
Brian Fiete 2021-12-27 15:05:58 -05:00
parent b2cb8f74d3
commit 87ab0ad169
2 changed files with 8 additions and 6 deletions

View file

@ -5410,7 +5410,7 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, BfMethodInstance*
return result;
}
else
{
{
auto val = mModule->GetDefaultTypedValue(returnType, true, (GetStructRetIdx(methodInstance) != -1) ? BfDefaultValueKind_Addr : BfDefaultValueKind_Value);
if (val.mKind == BfTypedValueKind_Addr)
val.mKind = BfTypedValueKind_RestrictedTempAddr;