Bug 32451

Summary: Incorrect compiler error CS0117 for class with event and obsolete attribute which uses a field defined in another file
Product: [Mono] Compilers Reporter: Alexander Köplinger <alex.koeplinger>
Component: C#Assignee: Marek Safar <masafa>
Severity: normal CC: mono-bugs+mono
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: Repro code

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