Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion java2python/compiler/visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ def nodeOpExpr(self, node, memo):
""" Accept and processes an operator expression. """
factory = self.factory.expr
self.fs = FS.l + ' ' + node.text + ' ' + FS.r
self.left, self.right = visitors = factory(parent=self), factory()
self.left, self.right = visitors = factory(parent=self), factory(parent=self)
self.zipWalk(node.children, visitors, memo)

acceptAnd = nodeOpExpr
Expand Down
22 changes: 22 additions & 0 deletions test/Self0.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
class Self0 {
private int v1 = 100;
public int v2 = 2;

public int test0(){
return v2 + v1;
}

public boolean test1(){
return (v1 == v2 || v2 < v1 );
}

public static void main(String[] args) {
Self0 s = new Self0();
System.out.println(s.test0());
if(s.test1())
System.out.println("True");
else
System.out.println("False");
}

}