Bug 5999 - Refactor rename does not rename the static constructor
Summary: Refactor rename does not rename the static constructor
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-07-06 07:32 UTC by Marcel Hellwig
Modified: 2012-07-09 08:10 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Possible patch. Tested, but no guaranty for correctness! (1.31 KB, patch)
2012-07-06 07:36 UTC, Marcel Hellwig
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Marcel Hellwig 2012-07-06 07:32:16 UTC
When you rename a constructor in a class where a static constructor exists, the static one won't be renamed.

class MainClass
{
	MainClass()
	{
	}

	static MainClass()
	{
	}
}
Comment 1 Marcel Hellwig 2012-07-06 07:36:31 UTC
Created attachment 2160 [details]
Possible patch. Tested, but no guaranty for correctness!

This is a possible patch but I think this will lead to further problems, but if this is correct feel free to apply it!
Comment 2 Mike Krüger 2012-07-09 08:10:00 UTC
fixed.

y, that would lead to further problems - in fact 'constructor' is a bad name for the static constructor thing - it's a class constructor - called only once the first time the class is accessed in any way the others are object constructors - called each time when an object of that class is created.

I've handled that case in the search engine.