mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
30 lines
670 B
Nim
30 lines
670 B
Nim
# Tries to test the full ownership path generated by idetools.
|
|
|
|
proc lev1(t1: string) =
|
|
var temp = t1
|
|
for i in 0..len(temp)-1:
|
|
temp[i] = chr(int(temp[i]) + 1)
|
|
|
|
proc lev2(t2: string) =
|
|
var temp = t2
|
|
for i in 0..len(temp)-1:
|
|
temp[i] = chr(int(temp[i]) + 1)
|
|
|
|
proc lev3(t3: string) =
|
|
var temp = t3
|
|
for i in 0..len(temp)-1:
|
|
temp[i] = chr(int(temp[i]) + 1)
|
|
|
|
proc lev4(t4: string) =
|
|
var temp = t4
|
|
for i in 0..len(temp)-1:
|
|
temp[i] = chr(int(temp[i]) + 1)
|
|
|
|
echo temp & "(lev4)"
|
|
lev4(temp & "(lev3)")
|
|
lev3(temp & "(lev2)")
|
|
lev2(temp & "(lev1)")
|
|
|
|
when isMainModule:
|
|
lev1("abcd")
|