[ https://issues.apache.org/jira/browse/GROOVY-8049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles reassigned GROOVY-8049: ----------------------------------- Assignee: Eric Milles > Trait properties with 'with' > ---------------------------- > > Key: GROOVY-8049 > URL: https://issues.apache.org/jira/browse/GROOVY-8049 > Project: Groovy > Issue Type: Bug > Affects Versions: 2.4.7 > Reporter: Daniil Ovchinnikov > Assignee: Eric Milles > Priority: Major > > {code} > @CompileStatic > interface I { > String getFoo() > } > @CompileStatic > trait T { > abstract I getProp() > def usage() { > prop.with { > foo.toUpperCase() > // Groovyc: [Static type checking] - Cannot find matching method > java.lang.Object#toUpperCase(). Please check if the declared type is right > and if the method exists. > // works when changed to getFoo().toUpperCase() > } > } > } > @CompileStatic > class Main implements T { > I prop = { "hello" } as I > static void main(String[] args) { > println new Main().usage() > } > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)