Prevent the construction of recursive tyStatic types (#9256)
Fixes #9255
This commit is contained in:
parent
70018aa683
commit
b8d2f79ef0
2 changed files with 20 additions and 4 deletions
13
tests/statictypes/t9255.nim
Normal file
13
tests/statictypes/t9255.nim
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue