gcj/276: gcjh still does not handle attribute with same name as method

osk@hem.passagen.se osk@hem.passagen.se
Sat Jul 1 12:40:00 GMT 2000


>Number:         276
>Category:       gcj
>Synopsis:       gcjh still does not handle attribute with same name as method
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 01 12:40:03 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Oskar Liljeblad
>Release:        unknown-1.0
>Organization:
>Environment:
Debian GNU/Linux
GNU libc 2.1.3
gcc 2.96 snapshot 20000612
libgcj snapshot 2000-06-18
>Description:
The header generated with gcjh for this class is not correct:

  class Test {
    int insets;
    public int getInsets() { return insets; }
    public int insets() { return getInsets(); }
  }

This is the relevant part of the generated header:

  class ::Test : public ::java::lang::Object
  {
  public:
    virtual jint getInsets () { return insets; }
    virtual jint insets ();
  public: // actually package-private
    Test ();
    jint insets__;
  };

As you can see, the body of getInsets () should be "return insets__"
instead.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the Java-prs mailing list