summary refs log tree commit diff stats
path: root/tests/concepts/t8280.nim
blob: ba33af34e0b2714f04d4cd5fe9f82580a2e48878 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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()])