summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorLemonBoy <LemonBoy@users.noreply.github.com>2018-10-09 14:26:34 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-10-09 14:26:34 +0200
commitb8d2f79ef094a3b825866a155d795e6c2b4a6c6a (patch)
tree1508cec277cbe0b8b8b2b05f4a798052a9f58acf /tests
parent70018aa683f93998b1b263cb0ddb5ec13ee4cfdf (diff)
downloadNim-b8d2f79ef094a3b825866a155d795e6c2b4a6c6a.tar.gz
Prevent the construction of recursive tyStatic types (#9256)
Fixes #9255
Diffstat (limited to 'tests')
-rw-r--r--tests/statictypes/t9255.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/statictypes/t9255.nim b/tests/statictypes/t9255.nim
new file mode 100644
index 000000000..bc8df6656
--- /dev/null
+++ b/tests/statictypes/t9255.nim
@@ -0,0 +1,13 @@
+discard """
+  errormsg: '''
+type mismatch: got <static[proc (a0: int): string{.noSideEffect, gcsafe, locks: 0.}](bar)>
+'''
+  line: 13
+"""
+
+macro fun(a: static float): untyped =
+  discard
+
+when isMainModule:
+  proc bar(a0: int): string = discard
+  fun(bar)