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

Bug 349880

Summary: [inline][refactoring] Inline method does not work with 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: P4 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:54:46 EDT
BETA_JAVA7

class C1 {
}

interface I1 {
}

class P extends C1 implements I1{
	
}

public class X1<T1 extends C1 & I1> {
	 private X1<P> f3;

	@SuppressWarnings("unchecked")
	<U extends C1 & I1> X1<U> getX() {
		return (X1<U>) f3;
	}

	X1<?> f2 = getX();
}

1) Invoke Inline... on getX()
2) Select either option (All or this invocation) , OK

-> Replaces the method invocation with 
X1<?> f2 = (X1<? extends C1>) f3;

=> Should be 
X1<?> f2 = (X1<? extends C1 & I1>) f3; ?
Comment 1 Deepak Azad CLA 2011-06-21 04:51:47 EDT
No diamonds here..
Comment 2 Deepak Azad CLA 2011-06-21 05:29:31 EDT
See bug 99931.
Comment 3 Eclipse Genie CLA 2020-05-01 20:29:29 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.