Skip to content

type application doesn't infer as consistent #54410

Open
@nsajko

Description

julia> struct S{T<:Tuple{Vararg{Nothing}}} end

julia> f() = S{<:Tuple{Vararg{Nothing}}}
f (generic function with 1 method)

julia> Base.infer_effects(f, Tuple{})
(?c,+e,!n,+t,+s,+m,+u)

julia> versioninfo()
Julia Version 1.12.0-DEV.489
Commit 29ced9e2a02 (2024-05-08 07:57 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-17.0.6 (ORCJIT, znver2)
Threads: 6 default, 0 interactive, 6 GC (on 8 virtual cores)

Older Julia versions have even worse effect inference for f.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions