#State as Functions | Dagger
1 messages ยท Page 1 of 1 (latest)
If I removed the Greeting param from the constructor, dagger does not populate the default solely from the struct field pragma, so it seems that the struct fields pragmas are redundant ?
Yes +default on the struct field is redundant, I think that's a doc error. +private is specific to fields, and correct
Thanks that answers my question!
(side note, it would be cool if the engine could expose a default constructor from just the fields, since 99% of times when I manually write a constructor, it's the same boilerplate every time... In that case a +default pragma on the field would actually be useful ๐
cc @vast osprey @ornate cedar ๐
Fair