Daniil Ovchinnikov created GROOVY-8309:
------------------------------------------

             Summary: Cannot DGM.plus() two lists with different types
                 Key: GROOVY-8309
                 URL: https://issues.apache.org/jira/browse/GROOVY-8309
             Project: Groovy
          Issue Type: Bug
            Reporter: Daniil Ovchinnikov


{code:title=Java}
void foo(List<String> s, List<Integer> i) {
  DefaultGroovyMethods.plus(s, i);
}
{code}

Expected: Javac should infer return type as {{List<Serializable>}}, but it 
can't.
Possible fix: define {{DGM.plus}} with wildcard types {{? extends T}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to