close #9891 by adding a test

This commit is contained in:
narimiran 2019-07-25 09:25:18 +02:00
commit 13190435a6
2 changed files with 19 additions and 0 deletions

15
tests/misc/tsamename.nim Normal file
View file

@ -0,0 +1,15 @@
# bug #9891
import "."/tsamename2
# this works
callFun(fooBar2)
when true:
# Error: attempting to call routine: 'processPattern'
callFun(fooBar)
when true:
# BUG: Error: internal error: expr(skModule); unknown symbol
proc processPattern() = discard
callFun(fooBar)

View file

@ -0,0 +1,4 @@
proc fooBar*()=discard
proc fooBar2*()=discard
proc callFun*[Fun](processPattern: Fun) =
processPattern()