[
https://issues.apache.org/jira/browse/GROOVY-6919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-6919:
--------------------------------
Fix Version/s: 2.5.17
> Static compilation fails with multiple bounds generics
> ------------------------------------------------------
>
> Key: GROOVY-6919
> URL: https://issues.apache.org/jira/browse/GROOVY-6919
> Project: Groovy
> Issue Type: Bug
> Components: Static compilation
> Affects Versions: 2.3.3, 2.4.0-rc-1
> Reporter: Mauro Molinari
> Assignee: Eric Milles
> Priority: Major
> Fix For: 4.0.0-beta-2, 2.5.17, 3.0.11
>
>
> Consider the following interfaces:
> {code:java}
> public interface H1 {
> String getFoo();
> }
> {code}
> {code:java}
> public interface H2 {
> String getBar();
> }
> {code}
> and the following Groovy class:
> {code}
> @CompileStatic
> class HGroovy {
> public <T extends H1 & H2> void doSomething(T obj) {
> obj.foo
> obj.bar
> }
> }
> {code}
> Compilation fails:
> {noformat}
> HGroovy.groovy: 9: [Static type checking] - No such property: bar for class: T
> @ line 9, column 3.
> obj.bar
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)