keep param pragmas in typed proc AST (#24711)

fixes #24702

(cherry picked from commit 1f8da3835f)
This commit is contained in:
metagn
2025-02-22 23:22:30 +03:00
committed by narimiran
parent 51edd9bd60
commit d3780bb7bd
2 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
discard """
nimout: '''
proc foo(a {.attr.}: int) =
discard
'''
"""
# fixes #24702
import macros
template attr*() {.pragma.}
proc foo(a {.attr.}: int) = discard
macro showImpl(a: typed) =
echo repr getImpl(a)
showImpl(foo)