From: <no...@so...> - 2001-08-19 23:05:52
|
Bugs item #449956, was opened at 2001-08-10 16:22 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112867&aid=449956&group_id=12867 Category: Jythonc compiler Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Samuele Pedroni (pedronis) Summary: jythonc 2.1a3 --package problem Initial Comment: Hi! I've found and (more or less) isolated a bug in jythonc 2.1a3. The bug occurs under the following circumstances: 1. A package derives a subclass A from a java class. 2. The same package derives a subclass B from A. 3. The package gets compiled with the --package option. When creating java code, jythonc 2.1a3 doubles the package name in front of B, i.e., if the name of the package is foo, then it creates the name foo.foo.B, which causes javac to terminate with an error. Here's a program that reproduces the bug: ----------------------------------- import java class spam(java.lang.Object): pass class eggs(spam): pass ----------------------------------- Here's what happens when the above program is being compiled with the --package option: /usr/local/jython-2.1a3/jythonc --package foo jcbug.py processing jcbug Required packages: java.lang Creating adapters: Creating .java files: jcbug module spam extends java.lang.Object eggs extends foo.foo.jcbug.spam Compiling .java to .class... Compiling with args: ['/usr/local/jdk1.2.2/bin/javac', '-classpath', '/usr/local/jython-2.1a3/jython.jar::./jpywork::/usr/local/jython-2.1a3/Tools/jythonc:/home/brinkman/prog/java/test/.:/usr/local/jython-2.1a3/Lib:/home/brinkman/prog/java/gumbie:/home/brinkman/prog/java', './jpywork/foo/jcbug.java'] 1 ./jpywork/foo/jcbug.java:103: Superclass foo.foo.jcbug.spam of nested class foo.jcbug. eggs not found. public static class eggs extends foo.foo.jcbug.spam implements org.python.core.PyProxy, org.python.core.ClassDictInit { ^ 1 error ERROR DURING JAVA COMPILATION... EXITING This problem does not occur with jythonc 2.0, so it seems to be new. Best, Peter bri...@ma... ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112867&aid=449956&group_id=12867 |