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

fix 1.10 Vararg deprecation warning #120

Merged
merged 1 commit into from
Sep 22, 2023
Merged

fix 1.10 Vararg deprecation warning #120

merged 1 commit into from
Sep 22, 2023

Conversation

visr
Copy link
Contributor

@visr visr commented Sep 22, 2023

Saw this running ArchGDAL tests:

Precompiling project...
  2 dependencies successfully precompiled in 7 seconds. 87 already precompiled.
  1 dependency had warnings during precompilation:
┌ DiskArrays [3c3547ce-8d99-4f5e-a174-61eb10b00ae3]
│  WARNING: 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)`.
│  WARNING: 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)`.
│  WARNING: 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)`.
└

This should still behave the same:

julia> g(x::Vararg{Real}) = 1
g (generic function with 1 method)

julia> g(1.0)
1

julia> g("")
ERROR: MethodError: no method matching g(::String)

Closest candidates are:
  g(::Real...)
   @ Main REPL[11]:1

Saw this running ArchGDAL tests:

```
Precompiling project...
  2 dependencies successfully precompiled in 7 seconds. 87 already precompiled.
  1 dependency had warnings during precompilation:
┌ DiskArrays [3c3547ce-8d99-4f5e-a174-61eb10b00ae3]
│  WARNING: 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)`.
│  WARNING: 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)`.
│  WARNING: 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)`.
└
```

This should still behave the same:
```
julia> g(x::Vararg{Real}) = 1
g (generic function with 1 method)

julia> g(1.0)
1

julia> g("")
ERROR: MethodError: no method matching g(::String)

Closest candidates are:
  g(::Real...)
   @ Main REPL[11]:1
```
@rafaqz rafaqz merged commit f62455b into JuliaIO:main Sep 22, 2023
12 checks passed
@visr visr deleted the patch-1 branch September 22, 2023 19:25
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

Successfully merging this pull request may close these issues.

2 participants