gabbhack/deser

`getFirstArgumentType` and `getProcReturnType` works incorrectly with complex types

gabbhack opened this issue · 0 comments

Related: gabbhack/deser_json#4

Example:

import macros, options

macro getFirstArgumentType*(f: typed{`proc`}): typedesc =
  ## for internal use only
  echo f.getTypeImpl.treeRepr
  f.getType[2]

proc test(a: Option[string]) = discard

echo getFirstArgumentType(test) # Option instead of Option[system.string]

Playground