Fix tests.

This commit is contained in:
whitequark 2016-02-27 13:33:28 +00:00
parent e421b22953
commit 8bbffab8c8
1 changed files with 2 additions and 0 deletions

View File

@ -710,6 +710,7 @@ class TypePrinter(object):
for attr in typ.attributes]) for attr in typ.attributes])
return "<instance {} {{\n\t\t{}\n\t}}>".format(typ.name, attrs) return "<instance {} {{\n\t\t{}\n\t}}>".format(typ.name, attrs)
else: else:
self.recurse_guard.add(typ)
return "<instance {} {{}}>".format(typ.name) return "<instance {} {{}}>".format(typ.name)
elif isinstance(typ, TMono): elif isinstance(typ, TMono):
if typ.params == {}: if typ.params == {}:
@ -754,6 +755,7 @@ class TypePrinter(object):
for attr in typ.attributes]) for attr in typ.attributes])
return "<constructor {} {{{}}}>".format(typ.name, attrs) return "<constructor {} {{{}}}>".format(typ.name, attrs)
else: else:
self.recurse_guard.add(typ)
return "<constructor {} {{}}>".format(typ.name) return "<constructor {} {{}}>".format(typ.name)
elif isinstance(typ, TBuiltin): elif isinstance(typ, TBuiltin):
return "<builtin {}>".format(typ.name) return "<builtin {}>".format(typ.name)