Skip to content

Commit cdb45c4

Browse files
authored
Merge pull request #25 from BobHanson/yadav1
Yadav1
2 parents 483ddb6 + 846adc0 commit cdb45c4

27 files changed

Lines changed: 6615 additions & 69 deletions
-26 Bytes
Binary file not shown.
-26 Bytes
Binary file not shown.

sources/net.sf.j2s.core/src/net/sf/j2s/core/astvisitors/Java2ScriptVisitor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
import org.eclipse.jdt.core.dom.WhileStatement;
123123
import org.eclipse.jdt.core.dom.WildcardType;
124124

125+
// BH 6/20/2018 -- fixes for (int var : new int[] {3,4,5}) becoming for var var
125126
// BH 6/19/2018 -- adds .j2s j2s.class.replacements=org.apache.log4j.->jalview.javascript.log4j.;
126127
// BH 5/15/2018 -- fix for a[pt++] |= 3 incrementing pt twice and disregarding a[][] (see test/Test_Or.java)
127128
// BH 3/27/2018 -- fix for anonymous inner classes of inner classes not having this.this$0
@@ -494,8 +495,7 @@ public boolean visit(EmptyStatement node) {
494495
}
495496

496497
public boolean visit(EnhancedForStatement node) {
497-
SimpleName name = node.getParameter().getName();
498-
String varName = name.getIdentifier();
498+
String varName = getQualifiedSimpleName(node.getParameter().getName());
499499
writeReplaceV("for (var V, $V = ", "V", varName);
500500
Expression exp = node.getExpression();
501501
ITypeBinding typeBinding = exp.resolveTypeBinding();
13.6 KB
Binary file not shown.

sources/net.sf.j2s.java.core/src/java/lang/Runtime.java

Lines changed: 920 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)