thanks @alaviss for the test
This commit is contained in:
parent
ffe4328b35
commit
17db15f9b1
3 changed files with 21 additions and 2 deletions
15
tests/macros/t17836.nim
Normal file
15
tests/macros/t17836.nim
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import macros
|
||||
|
||||
# Ensure that `isNil` works in the typed macro context when pass procs.
|
||||
|
||||
type
|
||||
O = object
|
||||
fn: proc(i: int): int
|
||||
|
||||
var o: O
|
||||
|
||||
macro typedBug(expr: typed) =
|
||||
doAssert expr[1] != nil
|
||||
doAssert not expr[1].isNil
|
||||
|
||||
typedBug(o.fn)
|
||||
Loading…
Add table
Add a link
Reference in a new issue