Files
Nim/tests/effects/teffects10.nim
Paul Tan fa84121421 effects: exclude swap() from "indirect calls" assumption (#15504)
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.
2020-10-06 18:05:31 +02:00

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()