-
Notifications
You must be signed in to change notification settings - Fork 173
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
Is the isRole call properly propogated? #323
Comments
Copied my comment from #316: It seems that AbstractNode.isRole() doesn't delegate to AbstractNode::role? but to the property reader AbstractNode::role. Not sure how to deal with that. |
I validated this behavior by adding some |
@mojavelinux If we do not trust JRuby method invocation magic we could try to make every call explicit and go into the direction we took with the converter and extension proxies, i.e. use Helpers.invoke() to explicitely methods on the Ruby objects. |
@ysb33r To work around your problem: |
Well, well, well, interesting behaviour, for if I use the following Groovy code, class A {
boolean isRole() {true}
String getRole() {'role'}
}
def a = new A()
println a.role |
😭 Wow, that change can really break code and it's very hard to spot the error. |
I started a question regarding this behaviour on the Groovy mailing list - http://groovy.markmail.org/search/?q=#query:+page:1+mid:eb6b3pt5v72v2qxb+state:results |
I think I prefer getting rid of JRuby method invocation magic and doing it all explicitely. |
On top of that change, I think we should get rid of the isRole() method. Instead, it should just be hasRole() with no arguments. The accessor here is really getRole() and we want that to win out. |
Fixed with #317 |
This follows on from #316.
Given this document,
When the transform is
image
, try to print thenode.role
A partial exception is
BTW it does not fail for the normal converters (which are all in Ruby).
The text was updated successfully, but these errors were encountered: