switch uses incorrect comparison method

Oct 16, 2013 at 8:41 PM
The following should leave myVar set to 5:

var myVar = 5;
switch (myVar) { case '5': myVar = 6; }

However Jint considers '5' a match for 5.

Simple fix though, ExecutionVisitor.Visit(SwitchStatement) should use BinaryExpressionType.Same instead of BinaryExpressionType.Equal.