Skip to content
This repository was archived by the owner on Jan 27, 2025. It is now read-only.
This repository was archived by the owner on Jan 27, 2025. It is now read-only.

Issue with Integer datatype comparision using equality operators #98

Description

@rishikeshpr

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 ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions