fixes codegen regression

This commit is contained in:
Andreas Rumpf 2016-06-02 20:40:55 +02:00
commit 09ac351a6f

View file

@ -138,9 +138,10 @@ proc mapType(typ: PType): TCTypeKind =
var base = skipTypes(typ.lastSon, typedescInst) var base = skipTypes(typ.lastSon, typedescInst)
case base.kind case base.kind
of tyOpenArray, tyArrayConstr, tyArray, tyVarargs: result = ctPtrToArray of tyOpenArray, tyArrayConstr, tyArray, tyVarargs: result = ctPtrToArray
of tySet: #of tySet:
if mapSetType(base) == ctArray: result = ctPtrToArray # if mapSetType(base) == ctArray: result = ctPtrToArray
else: result = ctPtr # else: result = ctPtr
# XXX for some reason this breaks the pegs module
else: result = ctPtr else: result = ctPtr
of tyPointer: result = ctPtr of tyPointer: result = ctPtr
of tySequence: result = ctNimSeq of tySequence: result = ctNimSeq