Bring this in line with how plain blocks are analysed and avoids codegen errors if one references variables defined in such a block.
11 lines
166 B
Nim
11 lines
166 B
Nim
discard """
|
|
errmsg: "undeclared identifier: 'z'"
|
|
line: 11
|
|
"""
|
|
|
|
# Open a new scope for static expr blocks
|
|
block:
|
|
let a = static:
|
|
var z = 123
|
|
33
|
|
echo z
|