kevingadd/JSIL — Issue #46: "is" operand not working
Author: xen2
Created: 2011-12-10 12:26:06+00:00
State: open

if I write simple code such as: "if (x is TypeY)", it doesn't get translated properly.

After tracking the problem little bit, I noticed that the Cgt.un which contains isinst should normally process it properly.

However, because of ICSharpCode optimizer (in SimplifyLogicNotArgument), this Cgt.un gets transformed into Cle.un. As a result, isinst is not detected anymore (by Translate_Cgt), and it results in wrong javascript code:

if (JSIL.TryCast(x, $asm01.TypeY) > null) {