Prevent the construction of recursive tyStatic types (#9256)

Fixes #9255
This commit is contained in:
LemonBoy 2018-10-09 14:26:34 +02:00 • committed by Andreas Rumpf
commit b8d2f79ef0
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)