Skip to content

Instantly share code, notes, and snippets.

@melix
Created July 4, 2013 06:45
Show Gist options
  • Save melix/5925412 to your computer and use it in GitHub Desktop.
Save melix/5925412 to your computer and use it in GitHub Desktop.
class Top {
int overload() { 0 }
}
class Bottom {
int overload(String... args) { 1+args.length }
}
@CompileStatic
void boom() {
def b = new Bottom()
assert b.overload() == 0 // fails, returns 1!
assert b.overload('a') == 2
assert b.overload('a','b') == 3
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment