tlambdaparam.nim 228 B

123456789101112131415
  1. discard """
  2. action: compile
  3. """
  4. # issue #18648
  5. type
  6. X* = ref object
  7. bar: proc (p: proc(v: openArray[byte]))
  8. template foo(x: X, p: proc(v: openArray[byte])) =
  9. x.bar(p)
  10. X().foo(proc(v: openArray[byte]) = discard @v)