summary refs log blame commit diff stats
path: root/tests/ccgbugs/tstringslice.nim
blob: d4d1a22948a453b440d62b120d88bb8823cc845f (plain) (tree)
1
2
3
4
5




                                       









                                                                         
discard """
  disabled: "true"
"""

# Now the compiler fails with OOM. yay.

# bug #794
type TRange = range[0..3]

const str = "123456789"

for i in TRange.low .. TRange.high:
  echo str[i]                          #This works fine
  echo str[int(i) .. int(TRange.high)] #So does this
  echo str[i .. TRange.high]           #The compiler complains about this