-
Notifications
You must be signed in to change notification settings - Fork 558
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
Name of RuleParameter is ignored if the type is recognized #384
Comments
I've had a dig around, and it seems like the main problem is
At first glance, it looks like the engine plucks a rule out of the cache if the inputs are of the same type ... doesn't matter if they are the same name. Also, I'm guessing that if a rule takes multiple inputs of the same type, the order that they are supplied to the cached rule will be anyone's guess. A quick fix might be to include the param name in that key calculation (perhaps sort the ruleParams by name beforehand?). At the moment I'm not sure what the side-effects would be. I do know that it fixes that test, although I would expect fail_results to then contain some kind of "Unknown identifier" message, but it instead contains this:
EDIT: from some quick tests, it looks like if the rule expression references a non-existent object/field, you get that error message if your inputs contain any dynamic objects ... but that's for another day. |
Closing, fixed by this PR: #386 |
Evaluating a rule twice with differently-named objects of the same type gives unexpected results.
Here's my test code:
The text was updated successfully, but these errors were encountered: