Bug 2465 - URGENT: cannot compile, internal compiler error: CS0584, on code instantiating a class
Summary: URGENT: cannot compile, internal compiler error: CS0584, on code instantiatin...
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: All Linux
: --- normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2011-12-12 14:55 UTC by Jonathan Shore
Modified: 2011-12-13 05:22 UTC (History)
1 user (show)

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

Small project (MonoDevelop) that demonstrates the problem (310.65 KB, application/x-bzip)
2011-12-12 14:55 UTC, Jonathan Shore

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 Jonathan Shore 2011-12-12 14:55:07 UTC
Created attachment 1034 [details]
Small project (MonoDevelop) that demonstrates the problem

Getting an internal compiler error:

error CS0584: Internal compiler error: Cannot cast from source type to destination type.

The code compiles properly on windows with the MS .NET compiler.  I've tried a number of code variations, all producing the same error.

I've included a stripped-down project which should produce the error.   This was compiled on Mono 2.10.6 (compiled with LLVM enabled).
Comment 1 Jonathan Shore 2011-12-12 15:15:54 UTC
BTW, I managed to work around this (there was an ambiguity between 2 constructors with default arguments).  That said, the compiler should not fault.
Comment 2 Marek Safar 2011-12-13 05:22:49 UTC
Fixed in master and 2-10 branch