codon
codon copied to clipboard
codon.jit does not support nonlocal
import codon
@codon.jit
def test():
a = 1
def P():
nonlocal a
print(a)
P()
a = 5
P()
if __name__ == "__main__":
test()
The error message is:
Assert failed: unknown type: (null)
Expression: 0
Source: /github/workspace/codon/sir/llvm/llvisitor.cpp:1510
Aborted
- python == 3.6
- codon-jit == 1.1
- codon == 0.15.3
But codon run xx.py support nonlocal
Yes. It might be a bug of codon.jit