fix #17812 (repr fails to compile with ARC/ORC) (#17816)

This commit is contained in:
flywind 2021-04-22 14:08:56 +08:00 • committed by GitHub
commit 53c898de41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 1 deletions

View file

@ -84,7 +84,7 @@ proc repr*(p: pointer): string =
proc repr*(p: proc): string =
## repr of a proc as its address
repr(cast[pointer](p))
repr(cast[ptr pointer](unsafeAddr p)[])
template repr*(x: distinct): string =
repr(distinctBase(typeof(x))(x))