diff options
Diffstat (limited to 'tests/procvar')
-rw-r--r-- | tests/procvar/tprocvar.nim | 2 | ||||
-rw-r--r-- | tests/procvar/tprocvar2.nim | 28 |
2 files changed, 15 insertions, 15 deletions
diff --git a/tests/procvar/tprocvar.nim b/tests/procvar/tprocvar.nim index 56f76c613..f523aa391 100644 --- a/tests/procvar/tprocvar.nim +++ b/tests/procvar/tprocvar.nim @@ -13,6 +13,6 @@ proc huh(x, y: var int) = proc so(c: TCallback) = c(2, 4) - + so(huh) diff --git a/tests/procvar/tprocvar2.nim b/tests/procvar/tprocvar2.nim index 237e2ef7a..a590bc4bd 100644 --- a/tests/procvar/tprocvar2.nim +++ b/tests/procvar/tprocvar2.nim @@ -2,7 +2,7 @@ discard """ file: "tprocvar.nim" output: "papbpcpdpe7" """ -# test variables of type proc +# test variables of type proc proc pa() {.cdecl.} = write(stdout, "pa") proc pb() {.cdecl.} = write(stdout, "pb") @@ -12,21 +12,21 @@ proc pe() {.cdecl.} = write(stdout, "pe") const algos = [pa, pb, pc, pd, pe] - -var - x: proc (a, b: int): int {.cdecl.} - -proc ha(c, d: int): int {.cdecl.} = - echo(c + d) - result = c + d + +var + x: proc (a, b: int): int {.cdecl.} + +proc ha(c, d: int): int {.cdecl.} = + echo(c + d) + result = c + d for a in items(algos): a() - -x = ha -discard x(3, 4) - -#OUT papbpcpdpe7 - + +x = ha +discard x(3, 4) + +#OUT papbpcpdpe7 + |