diff options
Diffstat (limited to 'tests/vm/tswap.nim')
-rw-r--r-- | tests/vm/tswap.nim | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/vm/tswap.nim b/tests/vm/tswap.nim index 2219be9ca..bdbe5528c 100644 --- a/tests/vm/tswap.nim +++ b/tests/vm/tswap.nim @@ -1,9 +1,11 @@ discard """ -msg: ''' +nimout: ''' x.data = @[10] y = @[11] x.data = @[11] -y = @[10]''' +y = @[10] +@[3, 2, 1] +''' """ # bug #2946 @@ -22,3 +24,11 @@ proc testSwap(): int {.compiletime.} = result = 99 const something = testSwap() + +# bug #15463 +block: + static: + var s = @[1, 2, 3] + swap(s[0], s[2]) + + echo s |