fixes #8434 (incomplete info in errmsg about 'required type') (#8441)

This commit is contained in:
skilchen 2018-07-30 10:41:59 +02:00 • committed by Andreas Rumpf
commit becb6743f8
2 changed files with 24 additions and 2 deletions

View file

@ -496,9 +496,15 @@ proc typeToString(typ: PType, prefer: TPreferedDesc = preferName): string =
add(result, typeToString(t.sons[i]))
result.add "]"
of tyAnd:
result = typeToString(t.sons[0]) & " and " & typeToString(t.sons[1])
for i, son in t.sons:
result.add(typeToString(son))
if i < t.sons.high:
result.add(" and ")
of tyOr:
result = typeToString(t.sons[0]) & " or " & typeToString(t.sons[1])
for i, son in t.sons:
result.add(typeToString(son))
if i < t.sons.high:
result.add(" or ")
of tyNot:
result = "not " & typeToString(t.sons[0])
of tyExpr: