#880 Type inference engine not recognizing TYPE as Class Object


System: Windows XP
Eclipse version: 3.3 and 3.4.2
Pydev version: 1.4.4
Eclipse install location: C:\eclipse3.3 and C:\eclipse-j2ee.3.4.2
Project location where the bug appears: C:\myworkspace\PPComWebTester
Jython: 2.2.1

The following should not produce an error in PyDev but it does:

from java.lang.Boolean import TYPE
print TYPE.getName()

TYPE is a static class object which is a member of the Boolean class. This code works fine if run directly in Jython.

This error is also an issue with the grinder library I use. It also uses static member variables.

And a note from the previous unrelated bug report pertaining to this bug:

Humm, the problem seems to be that type inference engine does not recognize
that TYPE is a Class object (although it should because java can give that
info... and it still thinks it's dealing with python at that point and
doesn't 'short-circuit' it).


  • Ross Nicholson

    Ross Nicholson - 2009-03-19
    • priority: 5 --> 9
  • Fabio Zadrozny

    Fabio Zadrozny - 2009-03-29
    • status: open --> closed-fixed
  • Fabio Zadrozny

    Fabio Zadrozny - 2009-03-29

    Fixed for 1.4.5 (svn: 2719)

    Checked with the example:

    from java.lang.Boolean import TYPE
    print TYPE.getName()

  • Ross Nicholson

    Ross Nicholson - 2009-03-31

    Great, this now works. However there is still a problem.

    Where the line "print TYPE.getName()" works, you should also be able to use "print TYPE.name", but this does not work.

    I'll add a new bug detailing this shortly.