Bug 10671 - Auto-Fix of Base Class is wrong (generates invalid code)
Summary: Auto-Fix of Base Class is wrong (generates invalid code)
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: 4.0
Hardware: PC All
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2013-02-26 00:52 UTC by Ciprian Khlud
Modified: 2013-02-26 04:33 UTC (History)
1 user (show)

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:

Description Ciprian Khlud 2013-02-26 00:52:21 UTC
Description of Problem:
Auto-Fix of Generate Setter depends on formatting of the code

Steps to reproduce the problem:
1. Create a console application
2. Paste this code as starting point:
using System;

namespace TestConsole
	public class Test :BaseMissing
	class MainClass
		public static void Main (string[] args)
			Console.WriteLine ("Hello World!");
3. set the cursor to the word: BaseMissing from the line: 
  public class Test :BaseMissing
4. Press Alt+Enter (to show quick fix)
5. It incorrectly states: Generate Nested Class

Expected Result:
1. The option Generate Nested Class should not appear if the class missing is the definition of the base class
2. Even better: if the BaseMissing starts with capital "I" maybe the two options shall be: Generate Interface (another typical case when you define a base class) and Generate Class

Actual result:
Clicking Generate Nested Class lets you define BaseMissing class:
public class Test :BaseMissing
	public class BaseMissing
Comment 1 Mike Krüger 2013-02-26 04:33:47 UTC