fix #13731, ambiguous repr of pointers (#13732)

This commit is contained in:
Miran 2020-03-23 20:03:07 +01:00 • committed by GitHub
commit 4fb7f076d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,10 +99,6 @@ proc repr*[T: tuple|object](x: T): string =
result = $typeof(x) result = $typeof(x)
reprObject(result, x) reprObject(result, x)
proc repr*[T](x: ptr T): string =
result.add repr(pointer(x)) & " "
result.add repr(x[])
proc repr*[T](x: ref T | ptr T): string = proc repr*[T](x: ref T | ptr T): string =
if isNil(x): return "nil" if isNil(x): return "nil"
result = $typeof(x) result = $typeof(x)