eclipse-jdt / eclipse-jdt/eclipse.jdt.ui
“pull up method refactoring:” causes compilation error for calling methods
- Dominant language
- Java
- Stars
- 59
- Forks
- 127
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 35
Description
Selecting sub() in class SubType, and clicking the Pull up refactoring, results in a compilation error for calling methods
Code before refactoring:
```java
class SuperType {
void add(ELEM e) {
}
ELEM get() {
return null;
}
}
class SubType extends SuperType {
// pull up ‘sub’
void sub(Integer i) {
add(i);
}
}
```
Code after refactoring:
```java
class SuperType {
void add(ELEM e) {
}
ELEM get() {
return null;
}
// pull up ‘sub’
void sub(Integer i) {
add(i);
}
}
class SubType extends SuperType {
}
```
Contributor guide
Research direction
Start by reproducing the Pull up refactoring on the provided SuperType and SubType example, then inspect the refactoring entry point and generated source around the moved sub method. Done means the refactored code compiles and the call to add remains valid after moving sub into SuperType.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100