Daniil Ovchinnikov created GROOVY-8974:
------------------------------------------

             Summary: STC ignores declaration type
                 Key: GROOVY-8974
                 URL: https://issues.apache.org/jira/browse/GROOVY-8974
             Project: Groovy
          Issue Type: Bug
          Components: Static Type Checker
    Affects Versions: 2.5.5
            Reporter: Daniil Ovchinnikov


{code:java}
static <T> T id(T arg) { arg }

@groovy.transform.CompileStatic
def ddd() {
  List<String> ls = id(new ArrayList<>())
  ls.get(0).toUpperCase() // Cannot find matching method 
java.lang.Object#toUpperCase()
}

println ddd()
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to