https://sharplab.io/#v2:DYLgZgzgPg9gDgUwHYAIDKBPCAXBBbAWAChjjgFsUAPACgEoUBeYlVlcyjFeplAZlJE27CtwCGAGgBGDRihZsFw1gEswKACJjcAFRV4EAOgByMAO6GtXAHwoAjCmwALZPKHKPGehJQAmJcoIwBAIbh4evj5edILCYigA1ChSQA== ```fs open System let x() = let y () = 3 let (a,b) = if DateTime.Now.Day > 1 then y(), 2 else 2, y() a + b ``` I would expect a direct tuple/detuple in a binding, like the above, to be rewritten to mutable a and b mutated directly from their branches. In cases where detupling is successful (example of a case below) the entire function compiles down to the result of `a + b`. ```fs let x() = let y () = 3 let (a,b) = y(), 2 a + b ``` Related: https://github.com/dotnet/coreclr/pull/21950
Activity
kerams commentedon Jul 14, 2021
This is done and can be closed.