From a86857543621c4c25bb264259137ad716f9d8b09 Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 21 Apr 2014 02:45:57 +0200 Subject: [PATCH] doc2 likes future.nim now --- compiler/typesrenderer.nim | 8 +++----- lib/pure/future.nim | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/compiler/typesrenderer.nim b/compiler/typesrenderer.nim index ebb9b7e15..790bd1047 100644 --- a/compiler/typesrenderer.nim +++ b/compiler/typesrenderer.nim @@ -69,7 +69,7 @@ proc renderType(n: PNode): string = for i in 1 .. 0 var typeStr = renderType(n[typePos]) - if typeStr.len < 1: + if typeStr.len < 1 and n[typePos+1].kind != nkEmpty: # Try with the last node, maybe its a default value. - assert n[typePos+1].kind != nkEmpty let typ = n[typePos+1].typ if not typ.isNil: typeStr = typeToString(typ, preferExported) - if typeStr.len < 1: - return + if typeStr.len < 1: return for i in 0 .. `*(p, b: expr): expr {.immediate.} = ## proc pass2(f: proc (x, y: float): float): float = ## f(2, 2) - createProcType(p, b) + result = createProcType(p, b)