Summary: | [change method signature] misleading error message when removing unused parameter of recursive function | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Michael Schierl <schierlm> |
Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
Status: | ASSIGNED --- | QA Contact: | |
Severity: | minor | ||
Priority: | P3 | CC: | daniel_megert, koen.van.dijken, stephan.herrmann |
Version: | 3.4 | Keywords: | helpwanted |
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Michael Schierl
2009-03-15 07:52:26 EDT
Also happens for non-static methods. Simpler test case: // try to remove parameter 'n' private int foo(int n) { return foo(n); } *** Bug 137175 has been marked as a duplicate of this bug. *** *** Bug 408387 has been marked as a duplicate of this bug. *** (In reply to comment #3) > *** Bug 408387 has been marked as a duplicate of this bug. *** I'm not sure why I didn't find this bug. Thanks for the cross-ref. Note, that bug 408387 comment 1 has some pondering about implementation strategies. The TempOccurrenceAnalyzer in ChangeSignatureProcessor.DeclarationUpdate.checkIfDeletedParametersUsed() should do something similar to ReferenceUpdate.isRecursiveReference() and handle method references specially if they point back to the original method. Arguments for parameters that will be deleted should be skipped. Don't forget about varargs. (In reply to bug 408387 comment #1) We usually do the analysis independent of the actual rewrite. Just depending on nodes that are deleted by an ASTRewrite is brittle, since the nodes could be deleted for many reasons (e.g. because they are moved to another place). 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. For the record: Still happens in 2019-12, still relevant for me. But probably I'll have to write the same again in 2029... (In reply to Michael Schierl from comment #7) > For the record: Still happens in 2019-12, still relevant for me. > > But probably I'll have to write the same again in 2029... Right, unless you or someone else provides a fix ;-). 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. For the record: Still happens in 2022-12, still relevant for me. (The Genie is getting more aggressive, complaining after 2 years now and not after 10) 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. For the record: Still happens in 2023-12, still relevant for me. See you in two years :D |