This commit is contained in:
Andreas Rumpf
2016-07-12 10:31:36 +02:00
parent 4f7a2e9def
commit 928222cc67

View File

@@ -541,7 +541,9 @@ proc typeToString(typ: PType, prefer: TPreferedDesc = preferName): string =
else:
result.add typeToString(t.sons[0])
of tyRange:
result = "range " & rangeToStr(t.n)
result = "range "
if t.n != nil and t.n.kind == nkRange:
result.add rangeToStr(t.n)
if prefer != preferExported:
result.add("(" & typeToString(t.sons[0]) & ")")
of tyProc: