GROOVY-11823: try super.propertyMissing(name) before outer class#2360
Closed
eric-milles wants to merge 1 commit intomasterfrom
Closed
GROOVY-11823: try super.propertyMissing(name) before outer class#2360eric-milles wants to merge 1 commit intomasterfrom
super.propertyMissing(name) before outer class#2360eric-milles wants to merge 1 commit intomasterfrom
Conversation
Member
Author
|
Adding the super class dispatch could be limited to cases where the super class explicitly declares the required method. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2360 +/- ##
==================================================
+ Coverage 67.0511% 67.0648% +0.0137%
- Complexity 29433 29442 +9
==================================================
Files 1382 1382
Lines 116192 116207 +15
Branches 20464 20467 +3
==================================================
+ Hits 77908 77934 +26
+ Misses 31806 31801 -5
+ Partials 6478 6472 -6
🚀 New features to boost your workflow:
|
6b526a9 to
969ca9c
Compare
Member
Author
|
I went with this: ed63edb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm on the fence about this one. On the off chance an inner class' super class provides "methodMissing" or "propertyMissing", all inner class non-static dispatch methods need to call
super.methodMissing(name,args)orsuper.propertyMissing(name)orsuper.propertyMissing(name,value). The super class must throw a MissingMethodException or MissingPropertyException for the caller to be able to fall back on current behavior.The "ignore" exception could be thrown for no super class "methodMissing" or no "name" support, which is not ideal. In the event the super class does not supply "methodMissing", there is a call to this method which is why a guard was added (to prevent stack overflow). :(