summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2017-03-24 16:02:10 +0200
committerZahary Karadjov <zahary@gmail.com>2017-03-24 17:07:30 +0200
commit189d28672cd72053040cafe632c87b1d5cbbc364 (patch)
treea11a62bf1c7330fc60c5c70af2236a6ec89017a7 /tests
parentd16557bbdb27a9022c39bdfc2d42295cc954724d (diff)
downloadNim-189d28672cd72053040cafe632c87b1d5cbbc364.tar.gz
close #2423
Diffstat (limited to 'tests')
-rw-r--r--tests/concepts/tmisc_issues.nim19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/concepts/tmisc_issues.nim b/tests/concepts/tmisc_issues.nim
index 5fc4e2116..233739580 100644
--- a/tests/concepts/tmisc_issues.nim
+++ b/tests/concepts/tmisc_issues.nim
@@ -4,7 +4,9 @@ true
 true
 true
 p has been called.
-p has been called.'''
+p has been called.
+implicit generic
+generic'''
 """
 
 # https://github.com/nim-lang/Nim/issues/1147
@@ -49,3 +51,18 @@ proc p[A: ProtocolFollower, B: ProtocolFollower](a: A, b: B) =
 p(ImplementorA(), ImplementorA())
 p(ImplementorA(), ImplementorB())
 
+# https://github.com/nim-lang/Nim/issues/2423
+proc put*[T](c: seq[T], x: T) = echo "generic"
+proc put*(c: seq) = echo "implicit generic"
+
+type
+  Container[T] = concept c
+    put(c)
+    put(c, T)
+
+proc c1(x: Container) = echo "implicit generic"
+c1(@[1])
+
+proc c2[T](x: Container[T]) = echo "generic"
+c2(@[1])
+