[ 
https://issues.apache.org/jira/browse/GROOVY-5453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Milles reassigned GROOVY-5453:
-----------------------------------

    Assignee: Eric Milles

> 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
>
> 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)

Reply via email to