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

Bug 349875

Summary: [refactoring] Introduce parameter Object... does not work for intersection types
Product: [Eclipse Project] JDT Reporter: Raksha Vasisht <raksha.vasisht>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: deepakazad, markus.kell.r
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Bug Depends on: 99931    
Bug Blocks:    

Description Raksha Vasisht CLA 2011-06-20 17:17:37 EDT
BETA_JAVA7

class C1 {
}

interface I1 {
}

public class X1<T1 extends C1 & I1> {
	 <U extends C1 & I1> X1<U> getX() {
		return null;
	}

	X1<?> f2 = getX();
}

1) Click on getX() -> Introduce parameter Object...
2) OK with default values


-> Error: 'Bound Mismatch' : The type U is not a valid substitute for the bounded parameter <T1 extends C1 & I1> of the type X1<T1>

On continue however, the refactoring succeeds without any error.
Comment 1 Deepak Azad CLA 2011-06-21 03:30:36 EDT
hmm... I don't see any diamond in the code snippet. This is a valid 1.5 code and nothing new in 1.7.
Comment 2 Deepak Azad CLA 2011-06-21 05:29:59 EDT
See bug 99931.
Comment 3 Eclipse Genie CLA 2020-02-08 11:56:47 EST
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.