Bug 13731 - Order of "Compile Include" lines in project files affects partial classes
Summary: Order of "Compile Include" lines in project files affects partial classes
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2013-08-02 18:51 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2013-08-07 13:01 UTC (History)
1 user (show)

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


Attachments
Test case, failure (1.81 KB, application/zip)
2013-08-02 18:51 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details
Test case, success (1.81 KB, application/zip)
2013-08-02 18:51 UTC, Brendan Zagaeski (Xamarin Team, assistant)
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 Brendan Zagaeski (Xamarin Team, assistant) 2013-08-02 18:51:36 UTC
Created attachment 4531 [details]
Test case, failure

Related to bug 13324, and bug 13289, but this case still fails in the latest Mono master off GitHub, assuming I compiled it properly :)

----

## Summary
Switching the order of the Compile Include lines in a project file can cause compilation errors if one part of a partial class has a base class while another does not.


## Steps to reproduce
1. Open the TestCaseSuccess or TestCaseFailure project in Xamarin Studio on Mac.
2. Compile


## Result
The TestCaseFailure project fails. Adding the base class at ReportServiceClient.iOS.cs:10 also works around the problem:
`partial class ReportServiceClient : ClientBase<IReportService>`


On the command line, this fails:
mcs /t:library /out:Test.dll /r:System.Servicemodel ReportServiceClient.iOS.cs ReportServiceClient.cs

And this succeeds:
mcs /t:library /out:Test.dll /r:System.Servicemodel ReportServiceClient.cs ReportServiceClient.iOS.cs



## Expected Result
The order of the "Compile Include" lines should not matter.
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2013-08-02 18:51:57 UTC
Created attachment 4532 [details]
Test case, success
Comment 2 Marek Safar 2013-08-07 13:01:25 UTC
Fixed in master