File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -852,15 +852,15 @@ module FSharpExprConvert =
852852 None, env.BindIsInstVal bind.Var ( ty, e)
853853
854854 // Remove let <compilerGeneratedVar> = <var> from quotation tree
855- | Expr.Val _ when bind.Var.IsCompilerGenerated ->
855+ | Expr.Val _ when bind.Var.IsCompilerGenerated && ( not bind.Var.IsMutable ) ->
856856 None, env.BindSubstVal bind.Var bind.Expr
857857
858858 // Remove let <compilerGeneratedVar> = () from quotation tree
859- | Expr.Const( Const.Unit, _, _) when bind.Var.IsCompilerGenerated ->
859+ | Expr.Const( Const.Unit, _, _) when bind.Var.IsCompilerGenerated && ( not bind.Var.IsMutable ) ->
860860 None, env.BindSubstVal bind.Var bind.Expr
861861
862862 // Remove let unionCase = ... from quotation tree
863- | Expr.Op( TOp.UnionCaseProof _, _, [ e], _) ->
863+ | Expr.Op( TOp.UnionCaseProof _, _, [ e], _) when ( not bind.Var.IsMutable ) ->
864864 None, env.BindSubstVal bind.Var e
865865
866866 | _ ->
You can’t perform that action at this time.
0 commit comments