Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expression#getVaraibleNames会获取到嵌套作用域中定义的局部变量 #431

Closed
nepheleHu opened this issue Dec 24, 2021 · 2 comments

Comments

@nepheleHu
Copy link

nepheleHu commented Dec 24, 2021

Script1 itemV1定义在全局作用域

let itemv1 = seq.get(info.value,index);
print( itemv1.name )

Expression#getVaraibleNames
[info, index]

Script2 itemV1定义在嵌套作用域

{
    let itemv1 = seq.get(info.value,index);
    print( itemv1.name )
}

Expression#getVaraibleNames
[info, index, itemv1]

对于第二种脚本,获取到的未定义变量多了itemv1

@nepheleHu nepheleHu changed the title Expression#getVaraibleNames会获取到嵌套作用域中定义的变量 Expression#getVaraibleNames会获取到嵌套作用域中定义的局部变量 Dec 24, 2021
@killme2008
Copy link
Owner

这是个 bug,其实是因为引用了 item1.name 引起的,会修复下。

killme2008 added a commit that referenced this issue Jan 12, 2022
killme2008 added a commit that referenced this issue Feb 25, 2022
@killme2008
Copy link
Owner

发布了 5.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants