Bug 12165 - Partial classes and nested namespaces confuse class hierarchy, failure to find suitable override
Summary: Partial classes and nested namespaces confuse class hierarchy, failure to fin...
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2013-05-08 12:05 UTC by jake
Modified: 2013-05-09 08:53 UTC (History)
1 user (show)

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


Attachments
Test solution that demonstrates the problem. (3.53 KB, application/zip)
2013-05-08 12:05 UTC, jake
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 GitHub or Developer Community 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 jake 2013-05-08 12:05:31 UTC
Created attachment 3933 [details]
Test solution that demonstrates the problem.

Description of Problem:
There is something about the magic of nested namespaces that confuses the class hierarchy for partial classes.  It took me a long time to narrow down this example from our production code base.  If you change the namespace in Inherits.cs to be flat (a single line) the problem disappears.  The code compiles as expected under Visual Studio.

Steps to reproduce the problem:
1. Run xbuild on the project
2. Observe errors


Actual Results:
Error about not finding a suitable override.

Expected Results:
Clean compilation.

How often does this happen? 
Every time

Additional Information:
None
Comment 1 Marek Safar 2013-05-09 08:53:03 UTC
Fixed in master