Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.0-rc-1
-
None
Description
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.
class Cat { static getFoo(String s) {'String'} static getFoo(CharSequence s) {'CharSequence'} } use (Cat) { assert 'abc'.getFoo() == 'String' //works assert 'abc'.foo == 'String' //fails }
Attachments
Issue Links
- relates to
-
GROOVY-10214 Update from Groovy 3.0.8 to 3.0.9 breaks category class
- Closed