Keyword argument constructor breaks Incomplete constructor

Interesting! It works if the keyword constructor is defined first:

julia> mutable struct Foo
           x::Float64
           y::Float64

           Foo(;x::Float64, y::Float64) = new(x, y)
           Foo() = new()
       end

julia> Foo()
Foo(6.94551569230195e-310, 0.0)

Looks like this gotcha was already reported here:

1 Like