Skip to content

GROOVY-12294: STC: emit consistent category error for all use() overl… - #2830

Open
paulk-asert wants to merge 1 commit into
apache:masterfrom
paulk-asert:groovy12294
Open

GROOVY-12294: STC: emit consistent category error for all use() overl…#2830
paulk-asert wants to merge 1 commit into
apache:masterfrom
paulk-asert:groovy12294

Conversation

@paulk-asert

Copy link
Copy Markdown
Contributor

…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.

…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-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 70.6163%. Comparing base (56964ab) to head (7397c4c).

Files with missing lines Patch % Lines
...roovy/transform/stc/StaticTypeCheckingVisitor.java 50.0000% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@                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     
Files with missing lines Coverage Δ
...roovy/transform/stc/StaticTypeCheckingVisitor.java 87.2602% <50.0000%> (ø)

... and 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@testlens-app

testlens-app Bot commented Aug 24, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: 7397c4c
▶️ Tests: 113122 executed
⚪️ Checks: 31/31 completed


Learn more about TestLens at testlens.app/docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants