# Vararg not always recognized as a type

**URL:** https://discourse.julialang.org/t/vararg-not-always-recognized-as-a-type/11558
**Category:** Internals & Design
**Created:** [June 9, 2018, 5:27pm UTC](https://discourse.julialang.org/t/vararg-not-always-recognized-as-a-type/11558 "2018-06-09T17:27:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![benninkrs](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/benninkrs/32/3191_2.png) [@benninkrs](https://discourse.julialang.org/u/benninkrs)
#### Post date: [June 9, 2018, 5:27pm UTC](https://discourse.julialang.org/t/vararg-not-always-recognized-as-a-type/11558/1 "2018-06-09T17:27:36Z")

</div>

We have

```julia
julia> Vararg isa Type
true

```

Since the manual [states](https://docs.julialang.org/en/stable/manual/types/#man-singleton-types-1) that every type `T` is an instance of `Type{T}`, I find this unexpected:

```julia
julia> Vararg isa Type{Vararg}
ERROR: TypeError: in Type, in parameter, expected Type, got Type{Vararg}

julia> t = Vararg
Vararg

julia> t isa Type{t}
ERROR: TypeError: in Type, in parameter, expected Type, got Type{Vararg}

```

---

<div class="post-metadata">

### Author: ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)
#### Post date: [June 10, 2018, 12:22pm UTC](https://discourse.julialang.org/t/vararg-not-always-recognized-as-a-type/11558/2 "2018-06-10T12:22:54Z")

</div>

Hah I was just puzzling over that a minute ago!

---

<div class="post-metadata">

### Author: ![jeff.bezanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeff.bezanson/32/48_2.png) [@jeff.bezanson](https://discourse.julialang.org/u/jeff.bezanson)
#### Post date: [June 12, 2018, 4:47pm UTC](https://discourse.julialang.org/t/vararg-not-always-recognized-as-a-type/11558/3 "2018-06-12T16:47:35Z")

</div>

`Vararg` is more of a “pseudo-type” that only makes sense as part of the structure of a tuple type. We should probably make `Vararg isa Type` false (similar to how TypeVars are not Types). In particular, it’s not valid to substitute `Vararg` as the value of a typevar, since then `Tuple{T} where T` is not necessarily a 1-element tuple, which would be very inconvenient.
