Custom pragmas in proc types (#8205)
This commit is contained in:
parent
c115090f6e
commit
dec97924a4
5 changed files with 30 additions and 14 deletions
|
|
@ -145,4 +145,12 @@ block:
|
|||
type Annotated {.simpleAttr.} = object
|
||||
|
||||
proc generic_proc[T]() =
|
||||
assert Annotated.hasCustomPragma(simpleAttr)
|
||||
assert Annotated.hasCustomPragma(simpleAttr)
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Pragma on proc type
|
||||
|
||||
let a: proc(x: int) {.defaultValue(5).} = nil
|
||||
static:
|
||||
doAssert hasCustomPragma(a.type, defaultValue)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue