This is a migrated thread and some comments may be shown as answers.

Bug in decompiling string cast to object

1 Answer 13 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 27 Jun 2013, 09:16 PM
There's some invalid decompiled C# in a specific case:

bool a1 = (object)("string" + 1) == ("string" + 1);

This shows in JustDecompile as:

bool a1 = string.Concat("string", 1) == string.Concat("string", 1);

The problem is that the original code will check reference equality because of the cast to object, returning false, while the decompiled code checks string equality, and returns true.

1 Answer, 1 is accepted

Sort by
0
Momchil
Telerik team
answered on 01 Jul 2013, 08:14 PM
Hello,

Thanks for pointing us this issue. It has been logged and we will be working on it in one of our future releases.

Please, do not hesitate to send us any other feedback or issue report you stumble upon.

Regards,
Momchil
Telerik
Tell us what you think about JustDecompile. Your opinion matters! You can use our forum, or our JustDecompile UserVoice website for feature requests.
Tags
General Discussions
Asked by
Joe
Top achievements
Rank 1
Answers by
Momchil
Telerik team
Share this question
or