Bug 32451 - Incorrect compiler error CS0117 for class with event and obsolete attribute which uses a field defined in another file
Summary: Incorrect compiler error CS0117 for class with event and obsolete attribute w...
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: 2015-07-25 07:20 UTC by Alexander Köplinger
Modified: 2015-07-28 09:02 UTC (History)
1 user (show)

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


Attachments
Repro code (580 bytes, application/x-zip-compressed)
2015-07-25 07:20 UTC, Alexander Köplinger
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 Alexander Köplinger 2015-07-25 07:20:35 UTC
Created attachment 12232 [details]
Repro code

Unzip the attached sample and compile with:

> mcs /t:library A.cs B.cs

It raises an invalid error:

> A.cs(15,24): error CS0117: `Program.Messages' does not contain a definition for `Test'
> B.cs(3,25): (Location of the symbol related to previous error)
> Compilation failed: 1 error(s), 0 warnings

This shouldn't happen, as B.cs contains the class mcs complains about.
Switching A.cs and B.cs in the command line or removing the event from A.cs makes the compilation work fine.

Repros on 3.12, 4.0 and master.
Comment 1 Marek Safar 2015-07-28 09:02:55 UTC
Fixed in master