Message391

Author nobody
Recipients
Date 2001-08-16.21:25:46
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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




History
Date User Action Args
2008-02-20 17:16:53adminlinkissue451746 messages
2008-02-20 17:16:53admincreate