Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341791

Summary: [content assist][5.0] Wrong code assist when overriding a generic method with multiple bounds
Product: [Eclipse Project] JDT Reporter: Mauro Molinari <mauromol>
Component: CoreAssignee: Ayushman Jain <amj87.iitr>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, Olivier_Thomann
Version: 3.6.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

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.