Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369410 - [content assist] doesn't qualify method from outer type when enclosing type has a homonym
Summary: [content assist] doesn't qualify method from outer type when enclosing type h...
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-23 11:00 EST by Markus Keller CLA
Modified: 2019-09-05 07:58 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2012-01-23 11:00:06 EST
package assist;

public class IntegerProducer {
    public Integer get() {
        return 1;
    }
}

class StringProducer {
    public String get() {
        return "a";
    }
}

class Sub extends IntegerProducer {
    void foo() {
        new StringProducer() {
            @Override
            public int hashCode() {
                return get;
            }
        }.hashCode();
    }
}

Content assist after "get" at the compile error should give "Sub.this.get()" when I select the first entry, but it just leaves get(), which binds to StringProducer#get(), since that binds stronger than the homonym in the outer type.
Comment 1 Dani Megert CLA 2012-01-30 08:49:00 EST
Broken  since 3.2.
Comment 2 Eclipse Genie CLA 2019-09-05 07:58:40 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.