fix #12521(type alias for openArray) (#17593)
* fix nim js cmp fails at CT * fix #12521 * address comments
This commit is contained in:
parent
dc89b21257
commit
83fa0fc843
2 changed files with 27 additions and 1 deletions
|
|
@ -453,7 +453,7 @@ proc genProcParams(m: BModule, t: PType, rettype, params: var Rope,
|
|||
params.add(~"NIM_NOALIAS ")
|
||||
params.add(param.loc.r)
|
||||
# declare the len field for open arrays:
|
||||
var arr = param.typ
|
||||
var arr = param.typ.skipTypes({tyGenericInst})
|
||||
if arr.kind in {tyVar, tyLent, tySink}: arr = arr.lastSon
|
||||
var j = 0
|
||||
while arr.kind in {tyOpenArray, tyVarargs}:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue