GROOVY-12294: STC: emit consistent category error for all use() overl… - #2830
Open
paulk-asert wants to merge 1 commit into
Open
GROOVY-12294: STC: emit consistent category error for all use() overl…#2830paulk-asert wants to merge 1 commit into
paulk-asert wants to merge 1 commit into
Conversation
…oads
The category error was keyed on exactly two arguments (category + closure),
so the varargs form use(A, B) { ... } fell through to generic no-such-method/
property errors. Detect any use() call resolving to the DGM extension methods
with a trailing closure. Also extend the error message to point at extension
modules as the type-checking-compatible alternative, and document the
limitation in the categories section of the metaprogramming guide.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2830 +/- ##
==================================================
- Coverage 70.6170% 70.6163% -0.0008%
- Complexity 36498 36500 +2
==================================================
Files 1571 1571
Lines 133911 133911
Branches 24681 24681
==================================================
- Hits 94564 94563 -1
- Misses 30824 30826 +2
+ Partials 8523 8522 -1
🚀 New features to boost your workflow:
|
✅ All tests passed ✅🏷️ Commit: 7397c4c Learn more about TestLens at testlens.app/docs. |
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.
…oads
The category error was keyed on exactly two arguments (category + closure), so the varargs form use(A, B) { ... } fell through to generic no-such-method/ property errors. Detect any use() call resolving to the DGM extension methods with a trailing closure. Also extend the error message to point at extension modules as the type-checking-compatible alternative, and document the limitation in the categories section of the metaprogramming guide.