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

Panic when evaluating an expression that adds a number to an array #829

Closed
tiymat opened this issue Jul 7, 2024 · 3 comments · Fixed by #823
Closed

Panic when evaluating an expression that adds a number to an array #829

tiymat opened this issue Jul 7, 2024 · 3 comments · Fixed by #823
Labels
bug Unexpected behavior deployed to `develop` Feature built. Currently BETA testing in the `develop` branch

Comments

@tiymat
Copy link
Contributor

tiymat commented Jul 7, 2024

Describe the bug:
Evaluating the following expression (or seemingly any of the same form, where a number is added to an array) causes a panic.
1 + %[1]

Expected behaviour:
An error should be printed without Murex crashing.

Screenshots:
image

Platform (please complete the following information):

  • OS, output from uname -a if supported: 6.9.7-arch1-1
  • Terminal Emulator: kitty 0.35.2
  • Murex version, output from version --no-app-name: 6.1.8300

Additional context
Attempting to add a number to an object (e.g. 1 + %{"foo":"bar"}) is properly handled and returns an error without panicking.

I'm currently working on something that involves going through a lot of edge cases involving expressions, and filing a lot of (potentially low-priority) issues as I discover them. If it's preferable for me to wait until I'm done and create one larger issue containing all the sub-issues I've found please let me know!

@tiymat tiymat added the bug Unexpected behavior label Jul 7, 2024
@lmorg
Copy link
Owner

lmorg commented Jul 7, 2024

I'm currently working on something that involves going through a lot of edge cases involving expressions, and filing a lot of (potentially low-priority) issues as I discover them. If it's preferable for me to wait until I'm done and create one larger issue containing all the sub-issues I've found please let me know!

Smaller tickets are easier to write tests against so the approach you've taken already is good.

Also want to add that I really appreciate all the testing and bug reporting you've done. It's fantastic work. Thank you!

@tiymat
Copy link
Contributor Author

tiymat commented Jul 7, 2024

Well, thanks for all you do to develop and maintain this great tool!

And it turns out that in light of ='s impending deprecation, I might not actually have many to report after all, as the ones I was thinking of were things like = behaving differently than other ways of writing expressions.

So for example the below one differs between = and just writing the expression, but just writing the expression and expr both give an error when evaluating it, so after = has been removed it won't be an issue anymore.
image

@lmorg lmorg added the in progress Issue is currently being worked on (possibly in a feature branch) label Jul 7, 2024
@lmorg lmorg linked a pull request Jul 7, 2024 that will close this issue
@lmorg lmorg added the deployed to `develop` Feature built. Currently BETA testing in the `develop` branch label Jul 7, 2024
@lmorg
Copy link
Owner

lmorg commented Jul 7, 2024

This doc might also be of interest for you (it's relatively old functionality but I've only just gotten round to writing a doc for it)

https://dev.murex.rocks/user-guide/strict-types.html

@lmorg lmorg removed the in progress Issue is currently being worked on (possibly in a feature branch) label Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected behavior deployed to `develop` Feature built. Currently BETA testing in the `develop` branch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants