Skip to content

feat: implement Expression.Quote for lambda expressions in IQueryable chains to resolve issue #50#51

Merged
koenbeuk merged 1 commit intomainfrom
fix/issue-50
Apr 30, 2026
Merged

feat: implement Expression.Quote for lambda expressions in IQueryable chains to resolve issue #50#51
koenbeuk merged 1 commit intomainfrom
fix/issue-50

Conversation

@koenbeuk
Copy link
Copy Markdown
Collaborator

#50

Copilot AI review requested due to automatic review settings April 30, 2026 00:01
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...veSharp.Generator/Emitter/ExpressionTreeEmitter.cs 88.88% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements correct expression-tree emission for lambdas passed through IQueryable/Queryable chains by using Expression.Quote (instead of Expression.Convert) when converting a lambda to Expression<TDelegate>, addressing runtime failures described in issue #50.

Changes:

  • Update the generator’s conversion emission to output Expression.Quote(...) for Expression<TDelegate> conversion nodes.
  • Add generator- and runtime-level test coverage for an [ExpressiveProperty] body containing an IQueryable<T> chain with lambda arguments.
  • Update verified generator output baselines to reflect Quote emission.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/ExpressiveSharp.Generator/Emitter/ExpressionTreeEmitter.cs Emits Expression.Quote for conversions targeting Expression<TDelegate> to fix IQueryable chain lambda handling.
tests/ExpressiveSharp.IntegrationTests/Tests/SynthesizedExpressiveTests.cs Adds an integration test reproducing issue #50 behavior via ExpandExpressives() and query execution.
tests/ExpressiveSharp.Generator.Tests/ExpressiveGenerator/ExpressivePropertyTests.cs Adds a generator test asserting Quote is emitted instead of Convert for lambda → Expression<TDelegate>.
tests/ExpressiveSharp.Generator.Tests/ExpressiveGenerator/ExpressivePropertyTests.BodyUsingQueryableWhereOrderBy_EmitsValidExpressionTree.verified.txt Updates baseline to reflect Expression.Quote in generated output.
tests/ExpressiveSharp.Generator.Tests/ExpressiveGenerator/ExpressivePropertyTests.BodyUsingQueryableLambdaChain_EmitsExpressionQuoteNotConvert.verified.txt Adds new verified baseline for the new generator test case.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@koenbeuk koenbeuk merged commit c780a01 into main Apr 30, 2026
21 checks passed
@koenbeuk koenbeuk deleted the fix/issue-50 branch April 30, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants