History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-15856
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Sergey Shkredov
Reporter: Maxim A. Babenko
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ReSharper

Change signature and type inference

Created: 05 Aug 06 22:06   Updated: 24 Jan 08 17:55
Component/s: Refactorings - Change Signature
Fix Version/s: Future Versions
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 213
Old URL: http://www.intellij.net/tracker/resharper/viewSCR?publicId=15856


 Description  « Hide
void Foo<A,B>(A a, B b)
		{
		}

Says: paramter 'b' is never used. Quite right. Applying quickfix to remove it. However, all invocations of Foo become invalid since B can no longer be inferred from usage.

Possible resolution: issue a warning.
Ideally it would be nice to detect cases when type parameters are no longer used as well...



 All   Comments   Work Log   Change History      Sort Order:
Andrey Simanovsky - 08 Aug 06 18:48
Re: #15856- Change signature and type inference
The same may happen with a regular method.

Ilya Ryzhenkov - 08 Oct 07 21:11
I think it should detect the following cases:
1. If parameter b is not used and B is only used to declare parameters - remove both with single quickfix.
2. If parameter b is not used and B is used inside method - remove parameter with quickfix and update usages to include type arguments explicitly, inferring as needed. Show conflicts, if type cannot be specified (e.g. C# 3.0 anonymous types)