Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-289022: Change method signature works incorrectly when default parameter values are used

$
0
0
Reporter Viktor Medvedev (Viktor.Medvedev) Viktor Medvedev (Viktor.Medvedev)
Created Mar 5, 2012 6:21:31 PM
Updated Mar 5, 2012 6:21:31 PM
Priority Normal
Type Bug
Fix versions No Fix versions
State Submitted
Assignee Sergey Shkredov (serjic.shkredov)
Subsystem Refactoring
Affected versions 5.1, 6.1
Fixed in build No Fixed in build
Before changing signature
public void Method(int param1 = 5, int param2 = 10)
{
    //..
}

public void Main()
{
    Method(20); //param1=20, param2=10
}


Steps:
  • Select method "Method"
  • Refactor -> Change Signature
  • Switch param1 and param2 (move down "param1")

After changing signature
public void Method(int param2 = 10, int param1 = 5)
{
    //..
}

public void Main()
{
    Method(20);  //param1=5, param2=20
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>