mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +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
|
else
|
||||||
{
|
{
|
||||||
// Normal case
|
// Normal case
|
||||||
if ((nextResult) && (varType->IsComposite()))
|
if ((nextResult) && (varType->IsComposite()) && (!isRefExpression))
|
||||||
{
|
{
|
||||||
needsValCopy = false;
|
needsValCopy = false;
|
||||||
varType = CreateRefType(varType);
|
varType = CreateRefType(varType);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue