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

Changing type of variables without removing them #26

Open
malhar1 opened this issue May 1, 2018 · 0 comments
Open

Changing type of variables without removing them #26

malhar1 opened this issue May 1, 2018 · 0 comments

Comments

@malhar1
Copy link

malhar1 commented May 1, 2018

First of all thank you for this excellent library..
I'm not sure if this is a bug or intended behavior..

expressionContext.Variables["salary"] = "70000";
//do some business logic and determine the 'salary' is supposed to be numeric
expressionContext.Variables["salary"] = 70000;
//evaluate expression for "salary * 1.1" ==> this causes exception

Fix/workaround:
expressionContext.Variables["salary"] = "70000";
//do some business logic and determine the 'salary' is supposed to be numeric
expressionContext.Variables.Remove("salary");
expressionContext.Variables["salary"] = 70000;
//evaluate expression for "salary * 1.1" ==> this causes exception

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

1 participant