diff options
Diffstat (limited to 'nim/cgen.pas')
-rw-r--r-- | nim/cgen.pas | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nim/cgen.pas b/nim/cgen.pas index ed12d3d8e..6a0ab0390 100644 --- a/nim/cgen.pas +++ b/nim/cgen.pas @@ -249,12 +249,12 @@ procedure UseMagic(m: BModule; const name: string); forward; {$include 'ccgtypes.pas'} // ------------------------------ Manager of temporaries ------------------ - +(* function beEqualTypes(a, b: PType): bool; begin // returns whether two type are equal for the backend result := sameType(skipGenericRange(a), skipGenericRange(b)) -end; +end; *) procedure getTemp(p: BProc; t: PType; var result: TLoc); begin @@ -642,6 +642,10 @@ begin else begin fillResult(res); assignParam(p, res); + if skipGeneric(res.typ).kind = tyArray then begin + include(res.loc.flags, lfIndirect); + res.loc.s := OnUnknown; + end; end; initVariable(p, res); genObjectInit(p, res.typ, res.loc, true); |