close #9891 by adding a test

(cherry picked from commit 13190435a6)
This commit is contained in:
narimiran
2019-07-25 09:25:18 +02:00
parent 8deb9cf14c
commit a7683f8b86
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()