summary refs log tree commit diff stats
path: root/tests/vm/tswap.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vm/tswap.nim')
-rw-r--r--tests/vm/tswap.nim12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/vm/tswap.nim b/tests/vm/tswap.nim
index 4243b5a71..bdbe5528c 100644
--- a/tests/vm/tswap.nim
+++ b/tests/vm/tswap.nim
@@ -3,7 +3,9 @@ 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