Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
I found a strange bug and I couldn't find any information except the link below. Just create a method with an optional parameter and the latest Git-Checkout version will raise an "Internal compiler error". Probably also other version will behave the same. The question is, am I missing some command line switches?! I would rather doubt that since it is a standard feature and should be enabled by default. If you want something bigger, just try to compile the corlib with the latest mono compiler. It should raise two "Internal compiler error" messages in the "System.Threading.Tasks.cs" file. I hope to see a fix for this, since optional parameters are quite important, at least they occur in larger codebases and cause trouble if not supported...
I found a sample solution and description which is not applicable to the current codebase (too many changes): http://stackoverflow.com/questions/4495108/mono-named-optional-parameters-compiler-bug
I cannot reproduce it with mono master or mono 2.11
Well, I am not using the Mono Build infrastructure, so maybe if I just create a new project from scratch for the Mono compiler, something get's screwed up?! But otherwise it is working just fine, only the optional parameter stuff fails. I will test it with the real Mono build system later, when I can find some time...
I am not sure what you mean by no using mono build infrastructure. I also tested opening mcs.csproj in VS and compiling on .net and that works as well.
I mean I just created a new mcs project from scratch and just added all the required files via reference in Visual Studio and copied the command preprocessor definitions from the original mono project ("NET_4_0;FULL_AST;..." & stuff). That's it. And when I do that, the resulting mono compiler is not able to deal with default parameters. But as I said, I will try it out for you later with the original mono build system and projects, and maybe it works (if it does for you it also should for me)...
Just really can't think of a reason why doing what I did will break it. That's why I am asking. Especially, since everything else works just fine. So I would rather guess it has something to do with configuration, some settings I didn't do in my private project that are done when using the build system.