fsharp / fsharp.github.io

F# Core Engineering Group
http://fsharp.github.io
45 stars 53 forks source link

String comparison #66

Closed ales004 closed 8 years ago

ales004 commented 8 years ago

Hi, I am not sure that this is the right place where to post this problem. I have noticed that the string comparison seems to work somehow differently than expected.

We had a couple of problems because writing string1 = string2 was returning false also if strings were equal. The only way to solve this problem is by writing string1.Equals(string2). Is it because of what described here? Maybe the structural comparison for strings is comparing object references?

In my opinion this is a bug as it is highly non intuitive... or I am doing something wrong?

Regards, Alessandro Seganti

sishtiaq commented 8 years ago

Can you post a small test case?

dsyme commented 8 years ago

Yes, please post an issue at http://github.com/Microsoft/visualfsharp, with full repro steps.