-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting properties #90
Comments
Yes! You need to overload |
See for an example here: Line 398 in 51bf096
|
It seems to work great, thank you! |
BTW, I haven't followed the entire discussion around |
I would say that Setfield.setproperties(MyType, patch) = ...
Setfield.constructor_of(::Type{<:MyType}) = error() And |
I'm interested in something like
Can I support it? I get an error from
assert_hasfields
because, of course,property
is not a field ofobject
. I'd like to be able to implementsetproperty(::Object, value, sym)
, similar toBase.setindex
, which would return a new object with that property modified. Is that possible?The text was updated successfully, but these errors were encountered: