diff options
author | LemonBoy <LemonBoy@users.noreply.github.com> | 2018-10-09 14:26:34 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-10-09 14:26:34 +0200 |
commit | b8d2f79ef094a3b825866a155d795e6c2b4a6c6a (patch) | |
tree | 1508cec277cbe0b8b8b2b05f4a798052a9f58acf /tests | |
parent | 70018aa683f93998b1b263cb0ddb5ec13ee4cfdf (diff) | |
download | Nim-b8d2f79ef094a3b825866a155d795e6c2b4a6c6a.tar.gz |
Prevent the construction of recursive tyStatic types (#9256)
Fixes #9255
Diffstat (limited to 'tests')
-rw-r--r-- | tests/statictypes/t9255.nim | 13 |
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) |