Open a new scope for static: expr blocks (#10649)
Bring this in line with how plain blocks are analysed and avoids codegen errors if one references variables defined in such a block.
This commit is contained in:
parent
f86835ce77
commit
e89aaaeaab
3 changed files with 21 additions and 1 deletions
5
tests/errmsgs/tstaticexprnotype.nim
Normal file
5
tests/errmsgs/tstaticexprnotype.nim
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
discard """
|
||||
action: reject
|
||||
"""
|
||||
|
||||
let x = static: discard
|
||||
Loading…
Add table
Add a link
Reference in a new issue