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

continue/break循环控制异常 #188

Closed
ImMortal-lzh opened this issue Mar 25, 2022 · 2 comments
Closed

continue/break循环控制异常 #188

ImMortal-lzh opened this issue Mar 25, 2022 · 2 comments

Comments

@ImMortal-lzh
Copy link

在for循环中使用continue和break,在某些特定嵌套场景下,会出现指令栈跳转的逻辑异常,且稳定复现。
使用版本为3.2.7。看到去年有类似ISSUE,但似乎一直没有解决。

例如
1.break
运行如下代码时,break指令会跳过if(a<0)中的loadAttr:0,导致执行时异常
a=1;
for(i=0; i < 1; i++){
if(i>1){

} else if(i<2){
    if(i==0){
        break;
    }
    a++;
 }

}
if(a<0){
return 0;
}
return a;

2.continue
运行如下代码时,continue指令会跳过i++中的loadAttr:i,导致执行时异常
a=1;
for(i=0; i < 1; i++){
if(i<2){
if(i==0){
continue;
}
a++;
}
}
return a;

@DQinYuan
Copy link
Collaborator

break continue 目前的实现是存在一些问题。我们正在修复。还在使用 QLExpress。我是新接手的维护者,目前正在研发新的版本。我们可以加个微信聊聊,微信号可以发我邮箱 dqydqyuan@gmail.com

@DQinYuan
Copy link
Collaborator

DQinYuan commented Nov 1, 2022

#216

该 pr 已经修复你的问题,可以用单测验一下

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