m-carrasco / BCT_TEST

testing code for BCT
0 stars 0 forks source link

Equals #3

Open m-carrasco opened 7 years ago

m-carrasco commented 7 years ago

Object.Equals doesn't work for value types like ints.

The following example doesn't work when is verified by Corral.

Line 32 is removed and an assert false is inserted. Corral finds a bugs when it should not. I think this could be fixed if Object.Equals between ints are normally compared. Currently System.Int32.Equals$System.Int32 is translated as an external procedure.

https://github.com/m7nu3l/BCT_TEST/blob/5371f503678e32da7c0b4d5ea283601b54bf26d8/Equals/Program.cs#L21-L47

In the other hand this slightly different example works as expected.

Instead of invoking Equals between ints (value types) is done by the == operator.

https://github.com/m7nu3l/BCT_TEST/blob/5371f503678e32da7c0b4d5ea283601b54bf26d8/Equals/Program.cs#L59-L83

m-carrasco commented 7 years ago

I have run BCT with -typeInfo 1 -wholeProgram options.