mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed invalid ref-to-non-ref implicit cast in foreach
This commit is contained in:
parent
2c439092c3
commit
5d14e714c2
1 changed files with 1 additions and 1 deletions
|
@ -6709,7 +6709,7 @@ void BfModule::Visit(BfForEachStatement* forEachStmt)
|
|||
else
|
||||
{
|
||||
// Normal case
|
||||
if ((nextResult) && (varType->IsComposite()))
|
||||
if ((nextResult) && (varType->IsComposite()) && (!isRefExpression))
|
||||
{
|
||||
needsValCopy = false;
|
||||
varType = CreateRefType(varType);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue