summary refs log tree commit diff stats
path: root/tests/run/tenumitems.nim
blob: 516839fb345b44b9aafcb16f948a98b827e2b578 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
discard """
  output: "A\nB\nC"
"""

type TAlphabet = enum
  A, B, C

iterator items(E: typedesc): E =
  for v in low(E)..high(E):
    yield v

for c in TAlphabet:
  echo($c)