summary refs log tree commit diff stats
path: root/tests/tsidee3.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tsidee3.nim')
-rwxr-xr-xtests/tsidee3.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/tsidee3.nim b/tests/tsidee3.nim
new file mode 100755
index 000000000..be94192e7
--- /dev/null
+++ b/tests/tsidee3.nim
@@ -0,0 +1,11 @@
+
+var
+  global: int
+
+proc dontcare(x: int): int {.noSideEffect.} = return x
+
+proc noSideEffect(x, y: int, p: proc (a: int): int {.noSideEffect.}): int {.noSideEffect.} = 
+  return x + y + dontcare(x)
+  
+echo noSideEffect(1, 3, dontcare) #OUT 5
+