Skip to content

Vector eltype depends on code executed before - only 1.9rc #48961

Closed
@aplavin

Description

@aplavin
# run in a fresh session
@show typeof([1, missing, 2])

prints typeof([1, missing, 2]) = Vector{Union{Missing, Int64}} as expected.
But add a totally irrelevant line, and eltype changes:

# run in a fresh session
[1, missing, nothing, 2]
@show typeof([1, missing, 2])

prints typeof([1, missing, 2]) = Vector{Any}.

Only happens on 1.9rc, not 1.8 nor 1.9 betas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorregressionRegression in behavior compared to a previous versiontypes and dispatchTypes, subtyping and method dispatch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions