Skip to content

Commit f8239cf

Browse files
committed
[c] Revert temporary dynamic references for now.
fusionlanguage#26
1 parent 5e5bff6 commit f8239cf

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

GenC.fu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ public class GenC : GenCCpp
10521052
void WriteStorageTemporary!(FuExpr expr)
10531053
{
10541054
if (expr.IsNewString(false)
1055-
|| (expr is FuCallExpr && expr.Type is FuOwningType))
1055+
|| (expr is FuCallExpr && expr.Type is FuStorageType))
10561056
WriteCTemporary(expr.Type, expr);
10571057
}
10581058

libfut.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9958,7 +9958,7 @@ int GenC::writeCTemporary(const FuType * type, const FuExpr * expr)
99589958

99599959
void GenC::writeStorageTemporary(const FuExpr * expr)
99609960
{
9961-
if (expr->isNewString(false) || (dynamic_cast<const FuCallExpr *>(expr) && dynamic_cast<const FuOwningType *>(expr->type.get())))
9961+
if (expr->isNewString(false) || (dynamic_cast<const FuCallExpr *>(expr) && dynamic_cast<const FuStorageType *>(expr->type.get())))
99629962
writeCTemporary(expr->type.get(), expr);
99639963
}
99649964

libfut.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10260,7 +10260,7 @@ int WriteCTemporary(FuType type, FuExpr expr)
1026010260

1026110261
void WriteStorageTemporary(FuExpr expr)
1026210262
{
10263-
if (expr.IsNewString(false) || (expr is FuCallExpr && expr.Type is FuOwningType))
10263+
if (expr.IsNewString(false) || (expr is FuCallExpr && expr.Type is FuStorageType))
1026410264
WriteCTemporary(expr.Type, expr);
1026510265
}
1026610266

libfut.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10602,7 +10602,7 @@ export class GenC extends GenCCpp
1060210602

1060310603
#writeStorageTemporary(expr)
1060410604
{
10605-
if (expr.isNewString(false) || (expr instanceof FuCallExpr && expr.type instanceof FuOwningType))
10605+
if (expr.isNewString(false) || (expr instanceof FuCallExpr && expr.type instanceof FuStorageType))
1060610606
this.#writeCTemporary(expr.type, expr);
1060710607
}
1060810608

test/MethodArgTempDynamic.fu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class Test
88

99
public static bool Run()
1010
{
11-
Consume(Create());
11+
Consume(Create()); //FAIL: c leak TODO
1212
return true;
1313
}
1414
}

0 commit comments

Comments
 (0)