You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently `Vararg` is a DataType, but is special cased in a
bunch of places to give it special behavior (e.g. in subtyping
and of course in tuple construction). However, unlike all other
DataTypes, it cannot appear as a type parameter, which caused trouble in
PR #38071. Having it be a DataType is a bit of a pun of convenience
in the first place - it's a lot more similar to a tvar (which can
be considered an implementation detail of UnionAll in the same way
Vararg is an implementation detail of Tuple), which has its own
non-type object. This PR does the same to Vararg, and moves it
from being an abstract DataType with special cased behavior to
its own custom type (called `Core.VarargMarker`). The user facing
behavior should be mostly unchanged, since `boot.jl` now has:
```
const Vararg{T, N} = VarargMarker{T, N}
```
i.e. we have a handly UnionAll wrapper that looks just like it
used to. The biggest difference is probably that VarargMarker
does not have `.parameters`, so code that tries to reach into
that explicitly will need to be adjusted. We could provide
a compatibility `getproperty` method to adapt that, but I'd
prefer to see how many packages need updating first, before
going that route.
This is essentially complete, but a few cleanup items remain.
0 commit comments