t17836.nim 243 B

123456789101112131415
  1. import macros
  2. # Ensure that `isNil` works in the typed macro context when pass procs.
  3. type
  4. O = object
  5. fn: proc(i: int): int
  6. var o: O
  7. macro typedBug(expr: typed) =
  8. doAssert expr[1] != nil
  9. doAssert not expr[1].isNil
  10. typedBug(o.fn)