Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Integer datatype comparision using equality operators #98

Open
rishikeshpr opened this issue Feb 14, 2013 · 1 comment
Open

Comments

@rishikeshpr
Copy link

Integer and long datatypes are not handled properly and it returns wrong result when used in a condition with equality operator.

C# Example Code :

public class Order
{
int _Quantity;

   public int Quantity 
   {
        get { return this._Quantity; }
        set { this_Quantity = value; }
   }

}

public static void Main()
{
IronJS.Hosting.CSharp.Context runtime = new CSharp.Context();

 strExpression  = "  if(order.Quantity == 400) {  true; } else {  false; }";     

  Order order = new Order();
  order.Quantity = 400;
  runtime.SetGlobal<Order>("order", order );
  dynamic d = runtime.Execute(strExpression);

}

The above Execute function returns result as false whereas result shoud be true .

This problem resolved at my end. Kindly let me know How do i send my changes for Commit ?

@gboya
Copy link
Contributor

gboya commented Feb 20, 2013

If you've fixed this issue, just fork this repository to have your own, commit your changes to your repository and then create a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants