Bug 33527 - "Error CS0584: Internal compiler error: The method or operation is not implemented." - caused by using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory
Summary: "Error CS0584: Internal compiler error: The method or operation is not implem...
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2015-08-31 22:19 UTC by David Lechner
Modified: 2015-09-01 05:49 UTC (History)
1 user (show)

Tags:
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:
Status:
RESOLVED FIXED

Description David Lechner 2015-08-31 22:19:14 UTC
This error was introduced in https://github.com/mono/mono/commit/322af7e0746e31392dde6c435b30c0eabb27de72.

I'm hitting the `throw new NotImplementedException ();` in line 1180.

Running mono 4.2 from the alpha repository.

Test Case (requires Microsoft.CodeAnalysis.CSharp package from nuget):


using Microsoft.CodeAnalysis.CSharp.Syntax;

using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory;

namespace TestCase {

    static class Extension
    {
        public static T DoSomething<T> (this T syntax) where T : TypeDeclarationSyntax
        {
            var methodList = new List<MethodDeclarationSyntax> ();

            return syntax;
        }
    }
}


When compiling, I get the error "Error CS0584: Internal compiler error: The method or operation is not implemented." on the line `var methodList = new List<MethodDeclarationSyntax> ();`.

If I remove the `static using` line, it compiles OK.

This code compiles fine with Mono 4.0, but fails in 4.2.
Comment 1 Marek Safar 2015-09-01 05:49:19 UTC
Fixed in master and mono 4.2 branch