Skip to content

Surprising world age error in Julia 1.12rc1 #59247

@RJDennis

Description

@RJDennis

The following MWE produces a world age problem that does not occur in Julia 1.11 or 1.10, etc.

struct store{T<:AbstractFloat}
    num::T
end

path = "c:/users/work/desktop/test_file.txt" # You will need to change this to align with where you put test_file.txt

function retrieve_file(path::Q) where {Q<:AbstractString}

    include(path)

    if length(n) != 0
        st = store(x)
    else
        st = store(x)
    end

    return st

end

st = retrieve_file(path) # Produces world age error
st = retrieve_file(path) # Running it again works

test_file.txt is attached.

test_file.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions