Skip to content

Instantly share code, notes, and snippets.

@RobertFischer
Created June 9, 2011 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobertFischer/1016880 to your computer and use it in GitHub Desktop.
Save RobertFischer/1016880 to your computer and use it in GitHub Desktop.
Scala Demonistration of Resolving (String, int, Object) in the face of (String, Object...) and (String, int, Object...)
object X {
def x(a:String, b:Int, c:Object*):String = { "1" }
def x(a:String, c:Object*):String = { "2" }
def doIt() = {
System.out.println(x("a", 2, new Object()))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment