Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve error reporting: Warning when the result of a comparison is ignored #1109
The following code raises a compiler warning that a boolean expression is being implicitly ignored.
let x = 10 let y = "hello" let changeX() = x = 20 y = "test"
For a new developer to F#, they are most likely trying to mutate the values of x and y but do not know about
The warning should be much clearer: -
The remainder of the error message can be the same as in #1108.
Then the developer will get a compile error about x being immutable:
which should read
I just looked at this one. there is already a differentiation if the left side is a property.
I think this will be easy to "fix". I will take this and turn it into a blog post ;-)
In other words: calling dibs
referenced this issue
Apr 25, 2016
I also wrote a small tutorial for potential newconers based on that problem:http://www.navision-blog.de/blog/2016/04/25/make-failure-great-again-a-small-journey-into-the-f-compiler/