[ https://issues.apache.org/jira/browse/GROOVY-5453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles resolved GROOVY-5453. --------------------------------- Fix Version/s: 4.0.0-beta-1 Resolution: Fixed > Incorrect resolve of category property for String > ------------------------------------------------- > > Key: GROOVY-5453 > URL: https://issues.apache.org/jira/browse/GROOVY-5453 > Project: Groovy > Issue Type: Bug > Components: Compiler > Affects Versions: 2.4.0-rc-1 > Reporter: Maxim Medvedev > Assignee: Eric Milles > Priority: Major > Fix For: 4.0.0-beta-1 > > > Assume you have two category methods with String and CharSequence as first > parameters respectively. The bug is that Groovy prefers the 'CharSequence' > method for String qualifier. > The bug is reproduced only for String and CharSequence types. > Direct accessor invoking returns correct result. > {code} > class Cat { > static getFoo(String s) {'String'} > static getFoo(CharSequence s) {'CharSequence'} > } > use (Cat) { > assert 'abc'.getFoo() == 'String' //works > assert 'abc'.foo == 'String' //fails > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)