diff --git a/tests/misc/tsamename.nim b/tests/misc/tsamename.nim new file mode 100644 index 0000000000..b2d17a5065 --- /dev/null +++ b/tests/misc/tsamename.nim @@ -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) diff --git a/tests/misc/tsamename2.nim b/tests/misc/tsamename2.nim new file mode 100644 index 0000000000..d2272f5574 --- /dev/null +++ b/tests/misc/tsamename2.nim @@ -0,0 +1,4 @@ +proc fooBar*()=discard +proc fooBar2*()=discard +proc callFun*[Fun](processPattern: Fun) = + processPattern()