disallow static in return type (#9686) [nobackport]
This commit is contained in:
parent
42e83ac24c
commit
ce148e71ef
3 changed files with 16 additions and 1 deletions
10
tests/errmsgs/tstaticresult.nim
Normal file
10
tests/errmsgs/tstaticresult.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
discard """
|
||||
errormsg: '''
|
||||
invalid type: 'static[int]' in this context: 'proc (x: int): static[int]' for proc
|
||||
'''
|
||||
"""
|
||||
|
||||
proc foo(x: int): static int =
|
||||
x + 123
|
||||
|
||||
echo foo(123)
|
||||
Loading…
Add table
Add a link
Reference in a new issue