fixes a minor bug when 'type' is used in a wrong way

This commit is contained in:
Araq 2014-10-02 11:10:43 +02:00
commit 2475794a75

View file

@ -1009,9 +1009,9 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext) =
put(g, tkElse, " else") put(g, tkElse, " else")
putWithSpace(g, tkColon, ":") putWithSpace(g, tkColon, ":")
gsub(g, n.sons[0]) gsub(g, n.sons[0])
of nkTypeOfExpr: of nkTypeOfExpr:
putWithSpace(g, tkType, "type") putWithSpace(g, tkType, "type")
gsub(g, n.sons[0]) if n.len > 0: gsub(g, n.sons[0])
of nkRefTy: of nkRefTy:
if sonsLen(n) > 0: if sonsLen(n) > 0:
putWithSpace(g, tkRef, "ref") putWithSpace(g, tkRef, "ref")