From 928222cc679639b694ef4a8635762be7e00c7ade Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Tue, 12 Jul 2016 10:31:36 +0200 Subject: [PATCH] fixes #4429 --- compiler/types.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/types.nim b/compiler/types.nim index 4d6bf05023..063eb0757a 100644 --- a/compiler/types.nim +++ b/compiler/types.nim @@ -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: