LinqGen icon indicating copy to clipboard operation
LinqGen copied to clipboard

Query syntax is not working

Open spi8823 opened this issue 1 year ago • 1 comments

First of all, I want to express my appreciation for this library. It has been incredibly useful, and I truly appreciate your work on it.

However, I have encountered an issue where the Source Generator does not function correctly when using query syntax. Is there a way to work around this problem?

Here is a minimal reproducible example:

using Cathei.LinqGen;

var array1 = Enumerable.Range(0, 10);

foreach(var i in from n in array1.Gen()
                 select n * 2)
    Console.WriteLine(i);

And this is my exception message: System.NotImplementedException: 'The method or operation is not implemented.'

Image

spi8823 avatar Feb 10 '25 14:02 spi8823

It seems that the ExpressionPredicate function does not work as expected when the SyntaxNode is a SelectClauseSyntax or WhereClauseSyntax, etc.

spi8823 avatar Feb 10 '25 14:02 spi8823