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

nil pointer error in alter --merge #850

Closed
lmorg opened this issue Aug 1, 2024 · 0 comments · Fixed by #849
Closed

nil pointer error in alter --merge #850

lmorg opened this issue Aug 1, 2024 · 0 comments · Fixed by #849
Labels
bug Unexpected behavior deployed to `develop` Feature built. Currently BETA testing in the `develop` branch

Comments

@lmorg
Copy link
Owner

lmorg commented Aug 1, 2024

Describe the bug:
Nil pointer error merging an object with an array of maps

murex » %{} ~> %{bob: [{message: "hello $k"}]  }
Error in `expr` (0,1): cannot merge map[bob:[map[message:hello c]]] with map[]: cannot merge new map into old. Likely this is because of a data-type mismatch: runtime error: invalid memory address or nil pointer dereference
                     > Expression: %{} ~> %{bob: [{message: "hello $k"}]  }
                     >           :  ^
                     > Character : 2
                     > Symbol    : ObjectBegin
                     > Value     : ''

also happens with

murex » %[a..c] -> foreach k { json <~ %{$k: [{message: "hello $k"}]  } }
Error in `expr` (0,14): cannot perform merge 'map[b:[map[message:hello b]]]' into 'json': cannot merge new map into old. Likely this is because of a data-type mismatch: runtime error: invalid memory address or nil pointer dereference
                      > Expression: json <~ %{$k: [{message: "hello $k"}]  }
                      >           : ^
                      > Character : 1
                      > Symbol    : Bareword
                      > Value     : 'json'
Error in `expr` (0,14): cannot perform merge 'map[c:[map[message:hello c]]]' into 'json': cannot merge new map into old. Likely this is because of a data-type mismatch: runtime error: invalid memory address or nil pointer dereference
                      > Expression: json <~ %{$k: [{message: "hello $k"}]  }
                      >           : ^
                      > Character : 1
                      > Symbol    : Bareword
                      > Value     : 'json'

Expected behaviour:
Objects merge

Platform (please complete the following information):

  • OS, output from uname -a if supported: macOS & Linux
  • Terminal Emulator: n/a
  • Murex version, output from version --no-app-name: latest

Additional context
Breaks systemctl autocompletion in v6.3.x

@lmorg lmorg added bug Unexpected behavior in progress Issue is currently being worked on (possibly in a feature branch) labels Aug 1, 2024
lmorg added a commit that referenced this issue Aug 1, 2024
@lmorg lmorg added the deployed to `develop` Feature built. Currently BETA testing in the `develop` branch label Aug 1, 2024
@lmorg lmorg linked a pull request Aug 1, 2024 that will close this issue
lmorg added a commit that referenced this issue Aug 1, 2024
@lmorg lmorg removed the in progress Issue is currently being worked on (possibly in a feature branch) label Aug 2, 2024
@lmorg lmorg mentioned this issue Sep 18, 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.

1 participant