Closed BlackEdder closed 9 years ago
Probably need special isWritableFieldOrProperty that can be used here: https://github.com/BlackEdder/painlessjson/blob/master/source/painlessjson/painlessjson.d#L312
Tried to solve this in the writable property branch, by checking the arity (number of variables) of the @property function, but getMember only retrieves the first defined function of a name. This results in a compile error given the unittest at the end of traits.d. If the definition of the foo functions is reversed this does pass. Do you know how to do this @Zalastax ?
I'll investigate this today. Great catch!
I have fixed it by checking with getOverloads (see last commit in writable_property branch). There is some code duplication going on though and whenever I try to move code around I run into CTFE issues. My CTFE foo is not very strong (and I have no more time today), so I would appreciate if you could have a quick look at cleaning it up :)
After that I think we can release it as version 1.0.0
I didn't have to use any complicated CTFE, just a better compiles traits usage. I think the code in my pull request is a good solution for this issue.
This issue is ready to be closed. I wouldn't mind having write permission just to manage issues. I will keep using pull requests for code.
I added you as collaborator. Probably best if we both work through pull requests and the other can quickly review it.
Adding the following to struct PointPrivateProperty
Results in the following compile error