summary refs log tree commit diff stats
path: root/tests/system/tstatic_callable_error.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/system/tstatic_callable_error.nim')
-rw-r--r--tests/system/tstatic_callable_error.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/system/tstatic_callable_error.nim b/tests/system/tstatic_callable_error.nim
new file mode 100644
index 000000000..c6f1e3d07
--- /dev/null
+++ b/tests/system/tstatic_callable_error.nim
@@ -0,0 +1,14 @@
+# bug #16987
+
+discard """
+errormsg: "cannot evaluate at compile time: inp"
+nimout: '''
+tstatic_callable_error.nim(14, 21) Error: cannot evaluate at compile time: inp'''
+"""
+
+
+# line 10
+proc getNum(a: int): int = a
+
+let inp = 123
+echo (static getNum(inp))