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

RSRP-196359: "Refactor - Move method" changes "string" to "String"

$
0
0
Reporter Alex Berezoutsky (fergard) Alex Berezoutsky (fergard)
Created Oct 27, 2010 7:22:04 PM
Updated Jan 4, 2012 8:07:52 PM
Priority Major
Type Bug
Fix versions No Fix versions
State Open
Assignee Sergey Shkredov (serjic.shkredov)
Subsystem No subsystem
Affected versions 6.0
Fixed in build No Fixed in build
Here's a simple way to reproduce:

1) Create a simple class and add the following method:

        public static string CreateMoveBug()
        {
            if (string.IsNullOrEmpty("Test"))
            {
                return null;
            }

            int.Parse("33");

            decimal.Parse("2.2");

            return string.Empty;
        }

2) Add an inner class to the class created above and name it whatever.

3) Do a refactor Move Method and move the above method into the inner class, the result is the following:

            public static string CreateMoveBug()
            {
                if (String.IsNullOrEmpty("Test"))
                {
                    return null;
                }

                Int32.Parse("33");

                Decimal.Parse("2.2");

                return String.Empty;
            }

I would expect it not to change any of the code of the method but it replaces all the C# aliases with their respective class.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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