nimpylib / pylib

"Write Python in Nim!" Python builtins/standard-Lib functions ported to Nim
https://nimpylib.github.io/pylib/
MIT License
8 stars 0 forks source link

nested def that has param fail to auto-capture nonlocal #12

Closed litlighilit closed 3 months ago

litlighilit commented 3 months ago

desc

see ci: https://github.com/nimpylib/pylib/actions/runs/9566699025/job/26372606233#step:5:1

demo:

def f():
  a = 1
  def g(x):
    print(a, x)
  g(3)

f()

when it runs, nodejs reports error.

Version

nim: 2.0.0 pylib: 0.9.0

litlighilit commented 3 months ago

runs on Nim devel (2.1.1)