Bug 33527

Summary: "Error CS0584: Internal compiler error: The method or operation is not implemented." - caused by using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory
Product: [Mono] Compilers Reporter: David Lechner <david>
Component: C#Assignee: Marek Safar <masafa>
Status: RESOLVED FIXED    
Severity: normal CC: mono-bugs+mono
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Tags: Is this bug a regression?: ---
Last known good build:

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