You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniil Ovchinnikov (JIRA)" <ji...@apache.org> on 2017/07/04 12:40:00 UTC
[jira] [Created] (GROOVY-8248) MethodSelectionException when
calling a overloaded method without arguments
Daniil Ovchinnikov created GROOVY-8248:
------------------------------------------
Summary: MethodSelectionException when calling a overloaded method without arguments
Key: GROOVY-8248
URL: https://issues.apache.org/jira/browse/GROOVY-8248
Project: Groovy
Issue Type: Bug
Affects Versions: 2.4.10
Reporter: Daniil Ovchinnikov
{code}
def methodWithOverload(a, b) {
println "$a $b"
}
def methodWithOverload(a) {
methodWithOverload(a, new Object())
}
methodWithOverload("hello", "world")
methodWithOverload("hello")
methodWithOverload() // MSE here
{code}
{noformat}
Caught: org.codehaus.groovy.runtime.metaclass.MethodSelectionException: Could not find which method methodWithOverload() to invoke from this list:
public java.lang.Object myscript#methodWithOverload(java.lang.Object)
public java.lang.Object myscript#methodWithOverload(java.lang.Object, java.lang.Object)
{noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)