Open joaogoliveira1 opened 4 years ago
Yes, that's a mistake in the docs, packing only works with mutable struct
s. Alternativvely you could use Setfield.jl. Fancy submitting a PR to fix the docs?
I'm new to Github. Should the pull request eliminate the reference to unpack in this case?
Maybe use Setfield in this instance, instead of @pack! ?
Maybe make a mutable struct:
@with_kw mutable struct MPara{R<:Real}
....
Also, maybe add a note that @pack!
only works with mutables.
Done!
Hello,
I was trying to run the example in the manual section "(Un)pack macros":
I get the following error:
Has the package been update in a way that this example is no longer valid? I could really use this feature of changing the values of an instance of parameters. Thanks.