fix genderef of jsgen (#5274)
This commit is contained in:
parent
c54bffae5b
commit
c7e54eba91
2 changed files with 21 additions and 1 deletions
|
|
@ -1200,7 +1200,7 @@ proc genDeref(p: PProc, n: PNode, r: var TCompRes) =
|
|||
r.res = "$1[$2]" % [a.address, a.res]
|
||||
elif n.sons[0].kind == nkCall:
|
||||
let tmp = p.getTemp
|
||||
r.res = "($1 = $2, $1[0][$1[1]])" % [tmp, a.res]
|
||||
r.res = "($1 = $2, $1[0])[$1[1]]" % [tmp, a.res]
|
||||
else:
|
||||
internalError(n.info, "genDeref")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue