# How to make new inner constructor syntax compatible with 0.5?

**URL:** <https://discourse.julialang.org/t/how-to-make-new-inner-constructor-syntax-compatible-with-0-5/2094>\
**Category:** General Usage\
**Created:** [February 14, 2017, 8:08am UTC](https://discourse.julialang.org/t/how-to-make-new-inner-constructor-syntax-compatible-with-0-5/2094 "2017-02-14T08:08:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dlfivefifty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlfivefifty/32/1959_2.png) [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)\
**Post date:** [February 14, 2017, 8:08am UTC](https://discourse.julialang.org/t/how-to-make-new-inner-constructor-syntax-compatible-with-0-5/2094/1 "2017-02-14T08:08:26Z")

</div>

How do I make the new inner constructor syntax

```julia
immutable Foo{T}
       Foo{T}() where T = new()
end

```

compatible with 0.5? I tried `@compat` with no luck.

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [February 14, 2017, 12:40pm UTC](https://discourse.julialang.org/t/how-to-make-new-inner-constructor-syntax-compatible-with-0-5/2094/2 "2017-02-14T12:40:53Z")

</div>

[https://github.com/JuliaCollections/DataStructures.jl/pull/268/files#diff-78071e0e2a3c314cff6bd5583a983f9cR50](https://github.com/JuliaCollections/DataStructures.jl/pull/268/files#diff-78071e0e2a3c314cff6bd5583a983f9cR50)

No `@compat` needed on 0.5.

---

<div class="post-metadata">

**Author:** ![dlfivefifty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlfivefifty/32/1959_2.png) [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)\
**Post date:** [February 14, 2017, 10:21pm UTC](https://discourse.julialang.org/t/how-to-make-new-inner-constructor-syntax-compatible-with-0-5/2094/3 "2017-02-14T22:21:09Z")

</div>

Ah, so this:

```julia
immutable Foo{T}
       (::Type{Foo{T}}){T}() = new{T}()
end

```

Beautiful 🤢
