mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
swap() will never call any procs passed to it, and so it can be safely excluded from the "assume indirect calls are taken" effects tracking rule.
13 lines
159 B
Nim
13 lines
159 B
Nim
discard """
|
|
action: compile
|
|
"""
|
|
|
|
# https://github.com/nim-lang/Nim/issues/15495
|
|
|
|
proc f() {.raises: [].} =
|
|
var a: proc ()
|
|
var b: proc ()
|
|
swap(a, b)
|
|
|
|
f()
|