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

arrayEquals cares about the order of elements in array #433

Open
george1459 opened this issue Jul 24, 2022 · 1 comment
Open

arrayEquals cares about the order of elements in array #433

george1459 opened this issue Jul 24, 2022 · 1 comment

Comments

@george1459
Copy link

george1459 commented Jul 24, 2022

In ThingTalk function calls, does the order of the parameter matter? e.g., are @com.slack.send(channel="general", message=title) and @com.slack.send(message=title, channel="general") the same thing?

If so, then the arrayEquals method here does not take into account this issue. This method is used to compare whether two InputParams[] (in InvocationExpression) are equal, resulting in the above two invocations being unequal.

@george1459
Copy link
Author

I discovered that typically optimize will deal with this. However, it's worth keeping in mind that if one just changes the Invocation AST node, this unexpected behavior could surface.

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