summary refs log tree commit diff stats
path: root/tests/range/tbug499771.nim
blob: 682148422556f8ca73c048e8c89e9e925fe0d564 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
discard """
  file: "tbug499771.nim"
  output: '''TSubRange: 5 from 1 to 10
true true true'''
"""
type 
  TSubRange = range[1 .. 10]
  TEnum = enum A, B, C
var sr: TSubRange = 5
echo("TSubRange: " & $sr & " from " & $low(TSubRange) & " to " & 
     $high(TSubRange))

const cset = {A} + {B}
echo A in cset, " ", B in cset, " ", C notin cset