fixes #89
This commit is contained in:
parent
1a2ccd6a23
commit
23340695d0
3 changed files with 16 additions and 4 deletions
|
|
@ -83,7 +83,10 @@ proc openArrayLoc(p: BProc, n: PNode): PRope =
|
|||
of tyOpenArray:
|
||||
result = ropef("$1, $1Len0", [rdLoc(a)])
|
||||
of tyString, tySequence:
|
||||
result = ropef("$1->data, $1->$2", [a.rdLoc, lenField()])
|
||||
if skipTypes(n.typ, abstractInst).kind == tyVar:
|
||||
result = ropef("(*$1)->data, (*$1)->$2", [a.rdLoc, lenField()])
|
||||
else:
|
||||
result = ropef("$1->data, $1->$2", [a.rdLoc, lenField()])
|
||||
of tyArray, tyArrayConstr:
|
||||
result = ropef("$1, $2", [rdLoc(a), toRope(lengthOrd(a.t))])
|
||||
else: InternalError("openArrayLoc: " & typeToString(a.t))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue