* fixes #10203
* make typredef test green again
* fixes the regressions differently
This commit is contained in:
Andreas Rumpf 2019-01-15 10:15:27 +01:00 • committed by GitHub
commit 05c52ff34f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 16 deletions

View file

@ -432,7 +432,7 @@ proc typeToString(typ: PType, prefer: TPreferedDesc = preferName): string =
sfAnon notin t.sym.flags:
if t.kind == tyInt and isIntLit(t):
result = t.sym.name.s & " literal(" & $t.n.intVal & ")"
elif t.kind == tyAlias:
elif t.kind == tyAlias and t.sons[0].kind != tyAlias:
result = typeToString(t.sons[0])
elif prefer in {preferName, preferTypeName} or t.sym.owner.isNil:
result = t.sym.name.s