dotnet / dotnet/fsharp

Mutable use binding compiles

Open
#5,341 11 comments 0 reactions 1 assignee Claimed by @edgarfgp View on GitHub
Area-Compiler-Checking Feature Improvement
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

```fsharp
open System.Drawing

let f() =
use mutable font = new Font("Arial", 10.0f)
font <- new Font("Arial", 11.0f)

f()
```

The above code compiles. Note that in C# it is not:

screen shot 2018-07-14 at 11 46 15

Using latest Mono and FCS from Ionide

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.