Bug 28772 - New auto-implemented property error with the first C# 6.0 alpha update.
Summary: New auto-implemented property error with the first C# 6.0 alpha update.
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2015-04-04 13:54 UTC by Brian Berry
Modified: 2015-08-25 23:42 UTC (History)
3 users (show)

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

Example project. (1.70 KB, application/octet-stream)
2015-04-04 13:55 UTC, Brian Berry

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:

Description Brian Berry 2015-04-04 13:54:12 UTC
Found: Previously accepted code now results in what look like false positive errors.

Steps to reproduce:
  * Load the attached project under the first C# 6.0-bearing alpha release.
  * Build the project.


Program.cs(24,34): error CS8080: `CS6.AutoProperties.MainClass.Baz.Condition': Auto-implemented properties must override all accessors of the overridden property

Expected: No error.


The simple case of an auto-implemented get-only property works fine (as noted).

In the abstract/overridden case, the override implements exactly the same set of accessors as prescribed by the abstract class.  The same construct worked fine up until this release.  So this is either a case of shouldn't-have-worked-before (past bug) or should-work-now (new bug).

Any insight appreciated.
Comment 1 Brian Berry 2015-04-04 13:55:32 UTC
Created attachment 10635 [details]
Example project.
Comment 2 Brian Berry 2015-04-04 14:04:19 UTC
Note that an initial workaround is to declare a public setter for the hierarchy, but this of course changes the contract from what was intended.
Comment 3 Brian Berry 2015-04-04 15:21:25 UTC
Note that MSVS 2015 CTP appears to accept this case just fine --- maybe just a case of some upstream Roslyn fixes that haven't yet been merged?
Comment 4 Marek Safar 2015-04-07 10:13:32 UTC
Fixed in master
Comment 5 John Colanduoni 2015-06-07 22:57:25 UTC
Has this fix been incorporated into any of the Mono releases? I am still having this issue running the MDK installed with the Alpha channel on OS X (
Comment 6 Marek Safar 2015-06-08 03:38:14 UTC
The fix will be included in Mono 4.2
Comment 7 Jahmai 2015-08-25 23:42:10 UTC
Is there a chance of merging this to 4.0? This effectively breaks a C# 6 language feature that is supposedly supported in 4.0 for any readonly overridable properties.