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)