fixes #794
This commit is contained in:
parent
1a9f266e50
commit
4d8cd34c9e
3 changed files with 33 additions and 18 deletions
10
tests/ccgbugs/tstringslice.nim
Normal file
10
tests/ccgbugs/tstringslice.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
# 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue