summary refs log tree commit diff stats
path: root/tests/concepts
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-11-05 21:31:02 +0100
committerAndreas Rumpf <rumpf_a@web.de>2017-11-05 21:31:02 +0100
commit9e4e1949e8e599bcfa560178243aabaf4b1bb68b (patch)
tree9beef3d83dd42d131200fffbf8322a692fc4291b /tests/concepts
parent4e4d466d060f9b55cb2adb3ad02e212281df4962 (diff)
downloadNim-9e4e1949e8e599bcfa560178243aabaf4b1bb68b.tar.gz
concepts: fixes the stack overflow that happens for #6691
Diffstat (limited to 'tests/concepts')
-rw-r--r--tests/concepts/tinfrecursion.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/concepts/tinfrecursion.nim b/tests/concepts/tinfrecursion.nim
new file mode 100644
index 000000000..60db410de
--- /dev/null
+++ b/tests/concepts/tinfrecursion.nim
@@ -0,0 +1,13 @@
+
+# bug #6691
+type
+  ConceptA = concept c
+
+  ConceptB = concept c
+      c.myProc(ConceptA)
+
+  Obj = object
+
+proc myProc(obj: Obj, x: ConceptA) = discard
+
+echo Obj is ConceptB