Expressions other than properties/method calls/indexing are allowed after _.
in dot-lambdas
#16136
Labels
Bug
Impact-High
(Internal MS Team use only) Describes an issue with extreme impact on existing code.
Regression
Milestone
Expressions other than properties/method calls/indexing are allowed after
_.
in dot-lambdas (see fsharp/fslang-suggestions#506, fsharp/fslang-design#710). I think this is a bug in #13907, unless there's something I'm missing from fsharp/fslang-design#710.Repro steps
_.expr
compiles asfun _ -> expr
, i.e., basicallyfun x -> ignore x; expr
.Expected behavior
This was surprising to me. I would have expected only properties, method calls, or indexing to be allowed.
Actual behavior
Any arbitrary expression can be used on the right-hand side of a dot-lambda (
_.
).Known workarounds
N/A.
Related information
This is in
main
and in the latest .NET 8 SDK.The text was updated successfully, but these errors were encountered: