-
-
Notifications
You must be signed in to change notification settings - Fork 740
Fix for issue #9967 - ParameterIdentifierTuple broken for setters #1378
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
Conversation
A regression due to commit 877e7bf fixing issue http://d.puremagic.com/issues/show_bug.cgi?id=3646 is causing this pull to fail. I will file a regression bug shortly. Edit: filed a regression bug http://d.puremagic.com/issues/show_bug.cgi?id=10548 |
Currently there's no way to get parameter identifiers from property functions. @property void prop(int x) {}
pragma(msg, typeof(&prop)); // prints "(int x)"
alias FP = typeof(&prop);
pragma(msg, FP); // prints "(int)" [!] Right now this is expected behavior. But at the same time this makes fixing bug 9967 impossible. |
I think that the enhancement is very useful as it serves the purpose without hacks/workarounds. I'm all with it. However, disregarding this particular issue, I'm not sure whether it is wise to make an alias that is not truly completely aliasing the original symbol. I would say that this is unexpected behaviour. |
I reconsidered about semantics, and then concluded that we can fix 10548 without any problems. Thank you for the good pointing out. |
Thanks for your great efforts and rapid response. |
This is all green. |
template Get(size_t i) | ||
{ | ||
enum Get = ""; | ||
static if (!isFunctionPointer!(func[0]) && !isDelegate!(func[0])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func
is 1-length tuple, so you can write like as isFunctionPointer!func
and isDelegate!func
.
LGTM, except one nitpick. |
Updated. |
Fix for issue #9967 - ParameterIdentifierTuple broken for setters
Thanks! |
Thank you! |
Fixes http://d.puremagic.com/issues/show_bug.cgi?id=9967
ParameterIdentifierTuple
broken for setters