@kwdef not working for parametric struct

Hi there,
I am super excited about @kwdef being added to Base. I believe it’s a great feature to make the code more robust. With that said, I can’t seem to get it to work with a parametric struct:

@kwdef struct A{T}

This returns: “UndefVarError: T not defined.” I am not sure where to post about it so I posted here.

It might be worth noting that @with_kw from Parameters.jl does work for the example above.

This was fixed in Julia 1.1 (see #29316), so try upgrading?

1 Like

Thank you. I am however on the LTS version v1.0.3. So does that mean that it’s also fixed for v1.0.4?

No, because #29316 is not a bugfix, its a feature.

1 Like

Though I believe I know the difference between a feature and a bug fix, I am not clear on the fact that we have this feature on v1.0.3 that is not working correctly, and from I am reading, it is not fixed in v1.0.4 though a fix does exist? Sorry for the confusion.