[
https://issues.apache.org/jira/browse/GROOVY-5136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles closed GROOVY-5136.
-------------------------------
Resolution: Information Provided
> Method selection misbehavior with category
> ------------------------------------------
>
> Key: GROOVY-5136
> URL: https://issues.apache.org/jira/browse/GROOVY-5136
> Project: Groovy
> Issue Type: Sub-task
> Components: groovy-runtime
> Affects Versions: 1.8.4
> Environment: Windows 7
> Reporter: Frank Hardy
> Priority: Minor
>
> While using a category I stumbled upon the following misbehaviour:
> {code}
> class SomeCategory {
> static def method(String self, def val) {
> self + val
> }
> }
> use(SomeCategory) {
> // should throw a MissingMethodException but calls method() with null as
> param
> assert "foo".method() == "foonull"
> }
> {code}
> I expected a MissingMethodException because a parameterless method doesn't
> exist.
> Am I wrong?
--
This message was sent by Atlassian Jira
(v8.20.1#820001)