Bug 8580 - Compiler cannot parse error
Summary: Compiler cannot parse error
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2012-11-23 17:54 UTC by John Copic
Modified: 2012-11-24 04:01 UTC (History)
1 user (show)

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

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 John Copic 2012-11-23 17:54:53 UTC
Trying to compile for Android, the following code in an activity:

	Android.Util.DisplayMetrics m = new Android.Util.DisplayMetrics();
	Activity.WindowManager.DefaultDisplay.GetMetrics( m );
	Android.Util.DisplayMetricsDensity density = m.DensityDpi;
	case Android.Util.DisplayMetricsDensity.Low:
	case Android.Util.DisplayMetricsDensity.Default:
	case Android.Util.DisplayMetricsDensity.Medium:

Fails to compile and cannot parse the error, being that Android.Util.DisplayMetricsDensity.Default and Android.Util.DisplayMetricsDensity.Medium are both defined constants, and they both == 160 (duplicate case).
Comment 1 John Copic 2012-11-23 17:56:26 UTC
The given error is 
/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/Microsoft.CSharp.Targets: Error: Compiler crashed with code: 1. (...)
Comment 2 Marek Safar 2012-11-24 04:01:28 UTC
I believe this issue is already fixed in Mono 3.0