I have noticed a bug when decompiling code which used the 'is' operator in a conditional statement.
Here is a simple reproduction of the issue using an 'if' statement.
Given the following piece of code
Here are two tests for checking the type of the boxed value in 'obj'
bool test = obj is int;
decompiles correctly, however when using the same expression as part of a conditional statement as as follows,
if (obj is int)
This decompiles to the following
bool flag = obj as int <= null;
if (obj as int != 0)
As you can see that when the 'is' operator is used in an expression of a conditional statement JustDecompile is decompiling to use the 'as' operator which is not valid when the type we are testing against is a value type.
JustDecompile Version : 2012.1.214.2