提交 cbd36aeb 编写于 作者: S Skylot

core: fix unused variables declaration

上级 2963bb3f
......@@ -200,10 +200,15 @@ public class ProcessVariables extends AbstractVisitor {
it.remove();
}
}
if (set.isEmpty()) {
IRegion region = null;
if (!set.isEmpty()) {
region = set.iterator().next();
} else if (!u.getAssigns().isEmpty()) {
region = u.getAssigns().iterator().next();
}
if (region == null) {
continue;
}
IRegion region = set.iterator().next();
IRegion parent = region;
boolean declare = false;
while (parent != null) {
......@@ -215,7 +220,6 @@ public class ProcessVariables extends AbstractVisitor {
region = parent;
parent = region.getParent();
}
if (!declare) {
declareVar(mth.getRegion(), u.getArg());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册