Björn Kautler created GROOVY-12293:
--------------------------------------

             Summary: STC with category classes or at least consistent error
                 Key: GROOVY-12293
                 URL: https://issues.apache.org/jira/browse/GROOVY-12293
             Project: Groovy
          Issue Type: Improvement
            Reporter: Björn Kautler


If you use a category like `use(...) { ... }` the STC throws a compile error, 
that usage of categories is not possible with STC due to their dynamic nature.

It would be nice if this limitation could be lifted. Why can't the category 
method not be resolved like other methods and under static compilation used 
directly?

I probably miss something why this is not possible, but maybe then at least a 
consistent error could somehow be issued. If I have a Spock specification under 
STC (there is a PR to make this possible and I ported it to an AST transform 
that also makes it possible) and there have a `@Use(...)` annotation, then the 
compile error just says that the method is not found while expectation was that 
it was resolved from the category.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to