Skip to content

Commit

Permalink
hopefully fix hcr
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Nov 9, 2024
1 parent e1e1292 commit af3be38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/cgen.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,9 @@ proc genVarPrototype(m: BModule, n: PNode) =
else:
let vis = if m.hcrOn: StaticProc else: Extern
var typ = getTypeDesc(m, sym.loc.t, dkVar)
if m.hcrOn or lfDynamicLib in sym.loc.flags:
if m.hcrOn:
typ = ptrType(typ)
if lfDynamicLib in sym.loc.flags:
typ = ptrType(typ)
m.s[cfsVars].addVar(m, sym,
name = sym.loc.snippet,
Expand Down

0 comments on commit af3be38

Please sign in to comment.