eclipse-jdt / eclipse-jdt/eclipse.jdt.ui
The Move Method refactoring caused an error related to "The declared type of the explicit 'this' parameter".
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 59
- Forks
- 127
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 37
Description
Select the method "m" , then click "refactor" -> "move" and move to the target class "TargetClass".
Error: "The declared type of the explicit 'this' parameter is expected to be TargetClass"
class SourceClass {
TargetClass t;
void m(SourceClass this) {}
}
class TargetClass{}
class SourceClass {
TargetClass t;
}
class TargetClass{
void m(SourceClass this) {}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue through the Refactor -> Move action using the SourceClass and TargetClass examples in the report. Trace the Move Method refactoring path and verify that moving m no longer produces the explicit-this type error while preserving the method declaration shown in the expected result.
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
- 38/100