summary refs log tree commit diff stats
path: root/tests/enum/tenum_no_rtti.nim
blob: 2e5c74b35699541292793fae8c68d8c4a7788eb6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
discard """
  output: '''A
B'''
  cmd: '''nim c --gc:arc $file'''
"""
type
  Enum = enum A, B, C
  EnumRange = range[A .. B]
proc test_a(x: Enum): string = $x
proc test_b(x: EnumRange): string = $x
echo test_a(A)
echo test_b(B)