Bug 911 - Constructors not renamed when renaming a class
Summary: Constructors not renamed when renaming a class
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: unspecified
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: Mike Krüger
URL:
: 3267 ()
Depends on:
Blocks:
 
Reported: 2011-09-19 14:25 UTC by Lluis Sanchez
Modified: 2015-08-20 03:24 UTC (History)
4 users (show)

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

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 Lluis Sanchez 2011-09-19 14:25:18 UTC
Bug/feature request in Monodevelop 2.6 in the refactoring function: pick a class from your code and use the context menu Refactor->Rename. It renames correctly but the class'es constructor(s) won't be renamed. Studio does that and I think MD should behave the same way.
Comment 1 Mike Krüger 2011-09-21 03:58:13 UTC
Seems to work in 2.8 / 2.6 - can you give me a use case where that fails ?

My test case was:


public class MyClass
{
	public MyClass ()
	{
	}
	
	public MyClass (int i)
	{
	}
	
	public MyClass (int i, string j)
	{
	}
}


Hover over MyClass - all constructors & declaration is highlighted. And rename works for me on any constructor + class declaration.

Tested on 2.6 final + 2.8 master.
Comment 2 Mike Krüger 2011-09-22 08:31:47 UTC
@"rene@brainloop.com" : Any infos on that ?
Comment 3 René Ruppert 2011-09-22 08:57:58 UTC
I tried to reproduce it but of course it is working now... You can close the bug. I'll reopen it in case I find a way to consistently reproduce it.
Comment 4 Mike Krüger 2011-09-27 06:21:31 UTC
kk closing that. Expect that it works generally better in 2.8 since 2.8 contains numerous parser fixes.

(however 2.8 won't be as good as 2.10 :))
Comment 5 Alan McGovern 2012-02-09 07:11:51 UTC
This bug exists in newresolver. The testcase in comment 1 demonstrates the issue.
Comment 6 Alan McGovern 2012-02-09 07:13:40 UTC
*** Bug 3267 has been marked as a duplicate of this bug. ***
Comment 7 Chris Hardy [MSFT] 2012-02-09 07:14:42 UTC
I hit the same issue with newresolver.
Comment 8 Mike Krüger 2012-02-09 08:26:13 UTC
fixed.