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

suboptimal return type inference for reverse(::Tuple) on v1.11 and master #54495

Open
nsajko opened this issue May 16, 2024 · 3 comments
Open

Comments

@nsajko
Copy link
Contributor

nsajko commented May 16, 2024

On v1.10:

julia> Core.Compiler.return_type(reverse, Tuple{Tuple})
Tuple

julia> Core.Compiler.return_type(reverse, Tuple{Tuple{Vararg{Int}}})
Tuple{Vararg{Int64}}

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: Linux (x86_64-linux-gnu)
  CPU: 8 × AMD Ryzen 3 5300U with Radeon Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver2)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)

On v1.11 and master:

julia> Core.Compiler.return_type(reverse, Tuple{Tuple})
Any

julia> Core.Compiler.return_type(reverse, Tuple{Tuple{Vararg{Int}}})
Any

julia> versioninfo()
Julia Version 1.11.0-beta1
Commit 08e1fc0abb9 (2024-04-10 08:40 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × AMD Ryzen 3 5300U with Radeon Graphics
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver2)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)

Xref #54462, seems similar.

@KristofferC
Copy link
Sponsor Member

Probably regressed in #50113.

@martinholters
Copy link
Member

Would probably be fixed by #54528?

@martinholters
Copy link
Member

Would probably be fixed by #54528?

Partially. Now (with #54528):

julia> Core.Compiler.return_type(reverse, Tuple{Tuple})
Tuple

julia> Core.Compiler.return_type(reverse, Tuple{Tuple{Vararg{Int}}})
Tuple

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants