Prevent the construction of recursive tyStatic types (#9256)

Fixes #9255

(cherry picked from commit b8d2f79ef0)
This commit is contained in:
LemonBoy
2018-10-09 14:26:34 +02:00
committed by narimiran
parent ffeb3c6cec
commit ddd54a3413
2 changed files with 20 additions and 4 deletions

View File

@@ -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)