[ 
https://issues.apache.org/jira/browse/GROOVY-4901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andres Almiray updated GROOVY-4901:
-----------------------------------
    Summary: Compilation exception for a method with generics and default 
access modifier  (was: Compilatin exception for a method with generics and 
default access modifier)

> Compilation exception for a method with generics and default access modifier
> ----------------------------------------------------------------------------
>
>                 Key: GROOVY-4901
>                 URL: https://issues.apache.org/jira/browse/GROOVY-4901
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 1.8.0
>         Environment: java version "1.6.0_24"
> Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326)
> Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode)
> Groovy Version: 1.8.0 JVM: 1.6.0_24
> Darwin 21.99.240.10.in-addr.arpa 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 
>  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
>            Reporter: Andres Almiray
>
> The following code fails with a compilation exception due to "bad syntax"
> {code:title=Foo.java}
> public interface Foo {}
> {code}
> {code:title=Bar.groovy}
> class Bar {
>     <Foo> void foo() {}
> }
> {code}
> {code}
> groovyc Foo.java Bar.groovy 
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
> failed:
> Bar.groovy: 2: unexpected token: < @ line 2, column 5.
>        <Foo> void foo() {}
>        ^
> 1 error
> {code}
> However if the {{public}} modifier is added to the method declaration this 
> will work. BUT it breaks when @Delegate is added into the mix (I know AST 
> xforms have plenty of corner cases, I'm pretty confident that if the 1st 
> error is solved then @Delegate should work as well).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to