How to make new inner constructor syntax compatible with 0.5?


#1

How do I make the new inner constructor syntax

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

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


#2

No @compat needed on 0.5.


#3

Ah, so this:

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

Beautiful :nauseated_face: