mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-29 10:43:57 +00:00
keep param pragmas in typed proc AST (#24711)
fixes #24702
(cherry picked from commit 1f8da3835f)
This commit is contained in:
16
tests/pragmas/tparamcustompragma.nim
Normal file
16
tests/pragmas/tparamcustompragma.nim
Normal 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)
|
||||
Reference in New Issue
Block a user