Daniel Sun created GROOVY-12804:
-----------------------------------

             Summary: Grape: @Grab on a script-level local variable is discarded
                 Key: GROOVY-12804
                 URL: https://issues.apache.org/jira/browse/GROOVY-12804
             Project: Groovy
          Issue Type: Bug
          Components: Grape
            Reporter: Daniel Sun


groovy.grape.GrapeClassLoaderTest#testScriptLocalVariableAnnotation in 
src/test/groovy/groovy/grape/GrapeClassLoaderTest.groovy is annotated 
@NotYetImplemented // annotations are discarded on local vars currently. The 
script is:

  @Grab(group = 'com.jidesoft', module = 'jide-oss', version = '...')
  String localVar = JideSplitButton.class.name
  localVar

The same annotation on a local variable inside a class method already works 
(testClassLocalVariableAnnotation).

GROOVY-3481 (Closed/Fixed) delivered local-variable annotations generally. Open 
GROOVY-10900 / GROOVY-10901 are about AST visibility / type-use annotations, 
not this Grape path.

Scanned SHA: ca71425976fd2e3da6db9634955ba0d39550a6d4 (apache/groovy master).

Acceptance criterion: A script-level local variable may carry @Grab (and, more 
generally, is not silently stripped of annotations), the test passes, and the 
annotation is removed.




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to