Inconsistent anonymous record instantiation on IQueryable #15648
Labels
Area-Queries
Query expressions and library implementation
Bug
Impact-Low
(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
When projecting an anonymous record on
IQueryable
the generated tree contains aDelegate.Invoke
for the anonymous type constructor, this causes some parsers/drivers to be unable to understand the operation (eg.Entity Framework
)This looks to happen when accessing deep members and having long record member names.
Repro steps
Provide the steps required to reproduce the problem:
Outputs:
The problem is:
The first case generates a plain constructor, and the second injects an IIFE for
Person.Name
which causes inconsistency in query parsingfrom: fsharp/fslang-suggestions#1249
Expected behavior
No difference between the expressions
Actual behavior
Delegate invocation inside the expression
Known workarounds
Use small record labels
Related information
The text was updated successfully, but these errors were encountered: