You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases, I can't use the with keyword to copy and update a record with the F# 7 nested records shortcut syntax, when the source record comes from a function call (but in some situations it compiles fine).
It seems the compiler gets somehow confused... (?)
mlaily
changed the title
Copy and update record expression doesn't compile when using a function output
Copy and update record expression doesn't compile when the record comes from a function
Nov 26, 2024
In some cases, I can't use the
with
keyword to copy and update a record with the F# 7 nested records shortcut syntax, when the source record comes from a function call (but in some situations it compiles fine).It seems the compiler gets somehow confused... (?)
Repro steps
The following code doesn't compile:
More precisely, the
okTest
compiles ok, but thefailingTest
does not.Expected behavior
I would expect the
failingTest
to work.Related information
Provide any related information (optional):
I'm using Visual Studio 17.12 on Windows, with .NET 9 installed.
I reproduced the issue when targeting .NET 8 and .NET 6 too, and also from VS Code.
Did I stumble on a real issue, or am I misunderstanding something?
The text was updated successfully, but these errors were encountered: