mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Fixed expression-bodied function with a ref return
This commit is contained in:
parent
3bb2e8947f
commit
d9444cc603
1 changed files with 2 additions and 2 deletions
|
@ -18783,10 +18783,10 @@ void BfModule::ProcessMethod(BfMethodInstance* methodInstance, bool isInlineDup)
|
|||
// Warn(0, "Using a 'void' return with an expression-bodied method isn't needed. Consider removing '=>' token", methodDeclaration->mFatArrowToken);
|
||||
// }
|
||||
|
||||
BfEvalExprFlags exprEvalFlags = BfEvalExprFlags_None;
|
||||
BfEvalExprFlags exprEvalFlags = BfEvalExprFlags_AllowRefExpr;
|
||||
if (expectingType->IsVoid())
|
||||
{
|
||||
exprEvalFlags = BfEvalExprFlags_NoCast;
|
||||
exprEvalFlags = (BfEvalExprFlags)(exprEvalFlags | BfEvalExprFlags_NoCast);
|
||||
|
||||
bool wasReturnGenericParam = false;
|
||||
if ((mCurMethodState->mClosureState != NULL) && (mCurMethodState->mClosureState->mReturnType != NULL))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue