some typeclasses don't work with typed
, macros.symBodyHash
crashes with ptr, ref
#17733
Labels
typed
, macros.symBodyHash
crashes with ptr, ref
#17733
Example
Current Output
uncomment
discard symHash(fn4)
:Error: 'fn4' doesn't have a concrete type, due to unspecified generic parameters.
uncomment
discard symHash(fn3)
:Error: unhandled exception: index out of bounds, the container is empty [IndexDefect]
Expected Output
these should all work
typed
(a typeclass should be valid)proc fn(a: ref)
should be typed but notproc fn(a: seq)
(etc)Additional Information
the innocent looking signature
proc hash*(x: pointer | ref | ptr): Hash {.inline.} =
caused a test to crash,tests/macros/tincremental.nim
, because it somehow callssymBodyHash
onhash
, which results in this bugThe text was updated successfully, but these errors were encountered: