Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341791 - [content assist][5.0] Wrong code assist when overriding a generic method with multiple bounds
Summary: [content assist][5.0] Wrong code assist when overriding a generic method with...
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ayushman Jain CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-04 10:40 EDT by Mauro Molinari CLA
Modified: 2020-03-30 03:54 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mauro Molinari CLA 2011-04-04 10:40:24 EDT
Build Identifier: M20110210-1200

See the steps to repro

Reproducible: Always

Steps to Reproduce:
1. write the following classes:

public interface A
{
	<T extends B & C> T getaMethod();
	<T extends B & C> void setaMethod(T param);
}

public class B
{
}

public interface C
{
}

public class D implements A
{
	@Override
	public <T extends B & C> T getaMethod()
	{
	  // TODO Stub di metodo generato automaticamente
	  return null;
	}

	| <= invoke code assist here to override setaMethod
}

2. expected result:

	public <T extends B & C> void setaMethod(T param) {
		
	}

3. actual result:

public <T extends B extends C> void setaMethod(T param) {};
Comment 1 Dani Megert CLA 2011-04-05 06:44:08 EDT
org.eclipse.jdt.core.CompletionProposal.getCompletion() is wrong:

[p, u, b, l, i, c,  , <, T,  , e, x, t, e, n, d, s,  , B,  , e, x, t, e, n, d, s,  , C, >,  , v, o, i, d,  , s, e, t, a, M, e, t, h, o, d, (, T,  , p, a, r, a, m, )]
Comment 2 Ayushman Jain CLA 2011-04-05 09:06:20 EDT
I'm guessing this should get fixed with bug 341795
Comment 3 Olivier Thomann CLA 2011-04-05 09:10:52 EDT
They are probably related. This test case is broken for compilation which means it is probably broken for many other things like code assist.
It would be good to understand how we end up with "extends" twice in the code proposal.
I'll let Srikanth take a look at the other issue unless you want to have a look.
Comment 4 Eclipse Genie CLA 2020-03-28 14:31:16 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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.
Comment 5 Mauro Molinari CLA 2020-03-30 03:54:58 EDT
This indeed is fixed in 2019-12.