[Swift-commit] r6349 - branches/release-0.94/src/org/griphyn/vdl/engine
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Fri Mar 8 12:48:03 CST 2013
Author: hategan
Date: 2013-03-08 12:48:02 -0600 (Fri, 08 Mar 2013)
New Revision: 6349
Modified:
branches/release-0.94/src/org/griphyn/vdl/engine/VariableScope.java
Log:
properly handle inhibitClosing in else branch if a close was added to match what is in the then branch
Modified: branches/release-0.94/src/org/griphyn/vdl/engine/VariableScope.java
===================================================================
--- branches/release-0.94/src/org/griphyn/vdl/engine/VariableScope.java 2013-03-08 07:01:03 UTC (rev 6348)
+++ branches/release-0.94/src/org/griphyn/vdl/engine/VariableScope.java 2013-03-08 18:48:02 UTC (rev 6349)
@@ -308,6 +308,9 @@
inhibitClosing = new HashSet<String>();
}
inhibitClosing.add(name);
+ if (thenScope != null) {
+ setPreClose(name, 0);
+ }
}
public void addVariable(String name, String type, String context, boolean global, XmlObject src) throws CompilationException {
@@ -650,7 +653,7 @@
}
private void setPreClose(String name, int count) {
- if (inhibitClosing != null && inhibitClosing.contains(name)) {
+ if (inhibitClosing != null && inhibitClosing.contains(name) && count != 0) {
return;
}
setCount("preClose", name, count,
More information about the Swift-commit
mailing list