This commit is contained in:
flywind 2020-11-05 21:00:08 +08:00 • committed by GitHub
commit a8af664e8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View file

@ -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