fixes codegen regression

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

View File

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