mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
13 lines
228 B
Nim
13 lines
228 B
Nim
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)
|