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

Base.operator_associativity(:?) incorrectly returns :left #54637

Open
savq opened this issue May 30, 2024 · 0 comments · May be fixed by #57165
Open

Base.operator_associativity(:?) incorrectly returns :left #54637

savq opened this issue May 30, 2024 · 0 comments · May be fixed by #57165

Comments

@savq
Copy link

savq commented May 30, 2024

The problem is basically the same bug as #35044. Base.operator_associativity defaults to returning :left, and misses the case for :?.

julia> Base.operator_associativity(:?)
:left

Expected behavior:

Return :right as that's the precedence for the ternary operator. As documented in Operator Precedence and Associativity

Install info
julia> versioninfo()
Julia Version 1.10.3
Commit 0b4590a5507 (2024-04-30 10:59 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (x86_64-apple-darwin22.4.0)
  CPU: 4 × Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, broadwell)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)
@adienes adienes linked a pull request Jan 27, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant