Skip to content

in(::Missing, ::Any) inconsistency #54407

@nsajko

Description

@nsajko
julia> missing  ()
false

julia> missing  (7,)
missing

julia> missing  Set(7)
false

julia> missing  []
false

julia> missing  [7]
missing

julia> missing  Int[]
false

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)

Currently behaves in a weird manner when it's first argument is missing. It sometimes returns missing and sometimes false. But I guess it never returns true. The result depends both on collection type and emptiness status.

Some of these results are featured in the doc string...

Metadata

Metadata

Assignees

No one assigned

    Labels

    collectionsData structures holding multiple items, e.g. setsmissing dataBase.missing and related functionalityneeds decisionA decision on this change is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions