Fix repr() for UncheckedArray (#9385)

This commit is contained in:
LemonBoy 2018-10-16 14:27:42 +02:00 • committed by Andreas Rumpf
commit 72cd3b7914
2 changed files with 3 additions and 1 deletions

View file

@ -58,7 +58,7 @@ type
tyUInt64, tyUInt64,
tyOptAsRef, tyUnused1, tyUnused2, tyOptAsRef, tyUnused1, tyUnused2,
tyVarargsHidden, tyVarargsHidden,
tyUnusedHidden, tyUncheckedArray,
tyProxyHidden, tyProxyHidden,
tyBuiltInTypeClassHidden, tyBuiltInTypeClassHidden,
tyUserTypeClassHidden, tyUserTypeClassHidden,

View file

@ -278,6 +278,8 @@ when not defined(useNimRtl):
of tyProc, tyPointer: of tyProc, tyPointer:
if cast[PPointer](p)[] == nil: add result, "nil" if cast[PPointer](p)[] == nil: add result, "nil"
else: add result, reprPointer(cast[PPointer](p)[]) else: add result, reprPointer(cast[PPointer](p)[])
of tyUncheckedArray:
add result, "[...]"
else: else:
add result, "(invalid data!)" add result, "(invalid data!)"
inc(cl.recdepth) inc(cl.recdepth)