GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test and fix vars defined inside blocks · SmartManoj/java2python@8a75871

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • java2python/compiler
    • visitor.py
  • test
    • If8.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎java2python/compiler/visitor.py‎

Copy file name to clipboardExpand all lines: java2python/compiler/visitor.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ class Interface(Class):
358358
""" Interface -> accepts AST branches for Java interfaces. """
359359

360360

361-
class MethodContent(Base):
361+
class MethodContent(VarAcceptor, Base):
362362
""" MethodContent -> accepts trees for blocks within methods. """
363363

364364
def acceptAssert(self, node, memo):
@@ -613,7 +613,7 @@ def acceptWhile(self, node, memo):
613613
whileStat.walk(blkNode, memo)
614614

615615

616-
class Method(VarAcceptor, ModifiersAcceptor, MethodContent):
616+
class Method(ModifiersAcceptor, MethodContent):
617617
""" Method -> accepts AST branches for method-level objects. """
618618

619619
def acceptFormalParamStdDecl(self, node, memo):
Collapse file

‎test/If8.java‎

Copy file name to clipboard
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class If8 {
2+
public static void main(String[] args) {
3+
if (true) {
4+
int y = 1;
5+
System.out.println(0 + y);
6+
}
7+
}
8+
}

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.