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

Deprecation fix #95

Open
ChrisRackauckas opened this issue Oct 21, 2024 · 1 comment
Open

Deprecation fix #95

ChrisRackauckas opened this issue Oct 21, 2024 · 1 comment
Assignees

Comments

@ChrisRackauckas
Copy link
Member

Chris Rackauckas
Sep 7th at 7:48 PM
(construct(::Type{T}, nodes::Tuple{Vararg{<:AbstractMultiScaleArray}}, args...)
where {T <: AbstractMultiScaleArray}) = __construct(T, nodes, eltype(T)[], args...)

(construct(::Type{T}, nodes::Tuple{Vararg{<:AbstractMultiScaleArray}}, values, args...)
where {T <: AbstractMultiScaleArray}) = __construct(T, nodes, values, args...)
gives:
ERROR: LoadError: Wrapping Vararg directly in UnionAll is deprecated (wrap the tuple instead).
You may need to write f(x::Vararg{T}) rather than f(x::Vararg{<:T}) or f(x::Vararg{T}) where T instead of f(x::Vararg{T} where T).
Stacktrace:
How do I handle this case?
8 replies

Oscar Smith
Sep 7th at 7:55 PM
Vararg{AbstractMultiScaleArray}
7:57
julia> Tuple{Int} <: Tuple{Vararg{Integer}}
true

Chris Rackauckas
Sep 7th at 9:02 PM
ERROR: LoadError: ArgumentError: Vararg on non-final argument in method definition for construct at /home/runner/work/MultiScaleArrays.jl/MultiScaleArrays.jl/src/shape_construction.jl:53

Oscar Smith
Sep 7th at 9:06 PM
wait, this signature was ever valid?
9:07
how is it supposed to choose between nodes and args?
9:07
@jeffbezanson
look at this horribleness
Saved for later • Due 1 month ago

Jeff Bezanson
Sep 10th at 3:57 PM
The error message is unhelpful here since it's showing a random example rather than what you actually did. In this case you'd need nodes::Tuple{Vararg{T<:S}} where T, just put the where outside the tuple instead of only outside the vararg.

Chris Rackauckas
Today at 4:46 AM
@Oscar Smith
can you help unblock this? I don't quite understand this.

@ChrisRackauckas
Copy link
Member Author

@oscardssmith I assigned you since I have no idea what to do with this, but it's blocking downstream.

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

No branches or pull requests

2 participants