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

Attempt to decompose a Pair results in a REPL crash #42552

Closed
maximk opened this issue Oct 8, 2021 · 1 comment · Fixed by #49368
Closed

Attempt to decompose a Pair results in a REPL crash #42552

maximk opened this issue Oct 8, 2021 · 1 comment · Fixed by #49368
Labels
bug Indicates an unexpected problem or unintended behavior duplicate Indicates similar issues or pull requests

Comments

@maximk
Copy link

maximk commented Oct 8, 2021

The crash happens when a user tries to decompose a Pair using a => operator on LHS. The correct approach is to use a tuple yet it is plausible users will try this syntax. I am not sure how it is interpreted by Julia.

julia> x = :a => 1
:a => 1

julia> (a => b) = x
Pair

julia> a┌ Error: Error in the keymap
│   exception =
│    MethodError: no method matching isless(::Symbol, ::Int64)
... (REPL crashes) ...

More context:

julia> versioninfo()
Julia Version 1.6.3
Commit ae8452a9e0 (2021-09-23 17:34 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i3-7100U CPU @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
@fredrikekre
Copy link
Member

Duplicate of #15483

@fredrikekre fredrikekre marked this as a duplicate of #15483 Oct 8, 2021
@LilithHafner LilithHafner added bug Indicates an unexpected problem or unintended behavior duplicate Indicates similar issues or pull requests labels Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior duplicate Indicates similar issues or pull requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants