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

Bug 493648

Summary: [pull up] Pulling up a method that returns this results in a compile-time error
Product: [Eclipse Project] JDT Reporter: Raffi Khatchadourian <raffi.khatchadourian>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: noopur_gupta, raffi.khatchadourian
Version: 3.8.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Raffi Khatchadourian CLA 2016-05-13 09:42:18 EDT
Before:

class I {
}

abstract class A extends I {
	public A m() {
		return this;
	}
}

After pulling up A.m() to I:

class I {
	public A m() {
		return this;
	}
}

abstract class A extends I {
}

The compile-time type of this has changed. It's no longer of type A but of type I. As such, this refactoring should fail preconditions.
Comment 1 Noopur Gupta CLA 2016-05-19 02:51:58 EDT
Reproducible in Eclipse 3.8.1 also.
Comment 2 Eclipse Genie CLA 2019-11-02 16:51:26 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.