summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2019-08-06 01:26:53 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-08-06 01:26:53 +0200
commitce148e71ef49dab3d8e61499bce40fd5718ecff4 (patch)
treebcbe4a2fe7bf453dba5bce2dcc4da341899fb4e8 /tests
parent42e83ac24ccdbc79612be2e0611ce7c82c38e8e1 (diff)
downloadNim-ce148e71ef49dab3d8e61499bce40fd5718ecff4.tar.gz
disallow static in return type (#9686) [nobackport]
Diffstat (limited to 'tests')
-rw-r--r--tests/errmsgs/tstaticresult.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/errmsgs/tstaticresult.nim b/tests/errmsgs/tstaticresult.nim
new file mode 100644
index 000000000..bc534c7a8
--- /dev/null
+++ b/tests/errmsgs/tstaticresult.nim
@@ -0,0 +1,10 @@
+discard """
+errormsg: '''
+invalid type: 'static[int]' in this context: 'proc (x: int): static[int]' for proc
+'''
+"""
+
+proc foo(x: int): static int =
+  x + 123
+
+echo foo(123)