GROOVY-12188: accept covariant override of abstract method regardless… - #2733
Closed
paulk-asert wants to merge 1 commit into
Closed
GROOVY-12188: accept covariant override of abstract method regardless…#2733paulk-asert wants to merge 1 commit into
paulk-asert wants to merge 1 commit into
Conversation
… of classgen order Since GROOVY-10687, a top-level class whose inner classes contain a closure is generated after its nest members, which can place it after its own subclass in the classgen order. The abstract-method check in ClassCompletionVerifier relied on the covariant bridge method that Verifier adds to the declaring class, so verifying a subclass first raised a spurious "same name but different return type" error. Recognise a covariant override directly instead; genuinely incompatible return types are still rejected by Verifier's covariant-method check.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2733 +/- ##
==================================================
+ Coverage 69.2732% 69.2743% +0.0012%
- Complexity 34769 34771 +2
==================================================
Files 1542 1542
Lines 130456 130461 +5
Branches 23786 23790 +4
==================================================
+ Hits 90371 90376 +5
Misses 31962 31962
Partials 8123 8123
🚀 New features to boost your workflow:
|
✅ All tests passed ✅🏷️ Commit: 3334e37 Learn more about TestLens at testlens.app. |
Contributor
Author
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.
… of classgen order
Since GROOVY-10687, a top-level class whose inner classes contain a closure is generated after its nest members, which can place it after its own subclass in the classgen order. The abstract-method check in ClassCompletionVerifier relied on the covariant bridge method that Verifier adds to the declaring class, so verifying a subclass first raised a spurious "same name but different return type" error. Recognise a covariant override directly instead; genuinely incompatible return types are still rejected by Verifier's covariant-method check.