Skip to content

Instantly share code, notes, and snippets.

@ishults
Last active December 16, 2015 20:02
Show Gist options
  • Save ishults/6fbd908db46f34e0b63d to your computer and use it in GitHub Desktop.
Save ishults/6fbd908db46f34e0b63d to your computer and use it in GitHub Desktop.
Adding a second parameter, even an optional one, means the no-arg method call will fail
void doSomething(def foo, def newParam = null) {
println foo
}
void doSomethingAgain(def baz, def newParam) {
println baz
}
doSomething() // Throws MethodSelectionException
doSomethingAgain('Test') // Throws MissingMethodException
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment