You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2017/05/02 02:09:07 UTC

[jira] [Reopened] (GROOVY-4757) Can't compile method with generic signatures and default visibiliy access

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

Paul King reopened GROOVY-4757:
-------------------------------

> Can't compile method with generic signatures and default visibiliy access
> -------------------------------------------------------------------------
>
>                 Key: GROOVY-4757
>                 URL: https://issues.apache.org/jira/browse/GROOVY-4757
>             Project: Groovy
>          Issue Type: Bug
>          Components: parser-antlr
>    Affects Versions: 1.7.10
>            Reporter: Andres Almiray
>            Assignee: Daniel Sun
>             Fix For: 3.0
>
>
> The following script results in a compilation error
> {code}
> class Foo {
>     <T extends Object> void foo(T t) {}
> }
> f = new Foo()
> // compiler output
> 1 compilation error:
> unexpected token: < at line: 2, column: 5
> {code}
> Adding a visibility accessor makes it work
> {code}
> class Foo {
>     public <T extends Object> void foo(T t) {}
> }
> f = new Foo()
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)