# Is there a way to know at compile time if a Proc is a closure?

**URL:** <https://forum.crystal-lang.org/t/is-there-a-way-to-know-at-compile-time-if-a-proc-is-a-closure/6950>\
**Category:** Help & Support\
**Created:** [June 21, 2024, 5:16pm UTC](https://forum.crystal-lang.org/t/is-there-a-way-to-know-at-compile-time-if-a-proc-is-a-closure/6950 "2024-06-21T17:16:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hugopl](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/hugopl/32/970_2.png) [@hugopl](https://forum.crystal-lang.org/u/hugopl)\
**Post date:** [June 21, 2024, 5:16pm UTC](https://forum.crystal-lang.org/t/is-there-a-way-to-know-at-compile-time-if-a-proc-is-a-closure/6950/1 "2024-06-21T17:16:38Z")

</div>

I’m writing some macros that capture blocks, but these blocks must have not closure\_data, I known the compiler has a way to check for that, since it does that on auto cast of Procs in C function calls, but is the user able to do the same?
