Issue451746
Created on 2001-08-16.21:25:46 by anonymous, last changed 2001-11-23.00:00:57 by pedronis.
Messages | |||
---|---|---|---|
msg391 (view) | Author: Nobody/Anonymous (nobody) | Date: 2001-08-16.21:25:46 | |
Hi! I've noticed a problem with the java code created by jythonc. In order to reproduce the problem, we need the following two files, foo.py and bug.py. ------------------- foo.py ------------------------- import java class foo(java.lang.Object): pass ---------------------------------------------------- --------------- bug.py ----------------------------- from foo import foo class bar(foo): pass ---------------------------------------------------- When compiling this with jythonc --deep bug.py I get the following messages: ---------------------------------------------------- Compiling with args: ['/usr/local/j2sdk1.3.1/bin/javac', '-classpath', '/usr/local/jython-2.0/jython.jar::./jpywork::/usr/local/jython-2.0/Tools/jythonc:/home/brinkman/prog/java/gumbie/work/.:/usr/local/jython-2.0/Lib:/home/brinkman/prog/java/gumbie:/home/brinkman/prog/java', './jpywork/foo.java', './jpywork/bug.java']1 ./jpywork/bug.java:60: j py$packages is inherited from foo and hides variable in outer class bug. An explicit 'this' qualifier must be used to select the desired instance. Py.initProxy(this, "bug", "bar", new Object[] {}, jpy$packages, jpy$properties, "", new String[] {"bug", "foo"}); ^ ./jpywork/bug.java:60: jpy$properties is inherited from foo and hides variable in outer class bug. An explicit 'this' qualifier must be used to select the desired instance. Py.initProxy(this, "bug", "bar", new Object[] {}, jpy$packages, jpy$properties, "", new String[] {"bug", "foo"}); ^ 2 errors ERROR DURING JAVA COMPILATION... EXITING --------------------------------------------------------------- Experiments suggest that the following circumstances are necessary to trigger the bug. 1. The class foo is derived from a java class. 2. The name of the module (foo) is the same as the name of the class. 3. The whole thing gets compiled with the --deep option. Note that these three conditions are not sufficient to trigger the bug; I've got examples satisfying both 1. and 2. that compile just fine. Best, Peter Brinkmann brinkman@math.uiuc.edu |
|||
msg392 (view) | Author: Samuele Pedroni (pedronis) | Date: 2001-11-22.23:57:02 | |
Logged In: YES user_id=61408 added as test341 |
|||
msg393 (view) | Author: Samuele Pedroni (pedronis) | Date: 2001-11-23.00:00:57 | |
Logged In: YES user_id=61408 Fixed in jython/Tools/jythonc PythonModule.py,2.17 proxies.py,2.14 |
History | |||
---|---|---|---|
Date | User | Action | Args |
2001-08-16 21:25:46 | anonymous | create |
Supported by Python Software Foundation,
Powered by Roundup