summary refs log tree commit diff stats
path: root/tests/concepts/t8280.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/concepts/t8280.nim')
-rw-r--r--tests/concepts/t8280.nim16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/concepts/t8280.nim b/tests/concepts/t8280.nim
new file mode 100644
index 000000000..ba33af34e
--- /dev/null
+++ b/tests/concepts/t8280.nim
@@ -0,0 +1,16 @@
+discard """
+  output: "()"
+"""
+
+type
+  Iterable[T] = concept x
+    for elem in x:
+      elem is T
+
+proc max[A](iter: Iterable[A]): A = 
+  discard
+
+type
+  MyType = object
+
+echo max(@[MyType()])