Skip to content

Instantly share code, notes, and snippets.

@taku0
Created February 25, 2012 04:57
Show Gist options
  • Save taku0/1906551 to your computer and use it in GitHub Desktop.
Save taku0/1906551 to your computer and use it in GitHub Desktop.
overloading by return type
class Foo {
def foo(implicit x: X) = x
def foo(implicit y: Y) = y
class X
class Y
implicit val x_ = new X
implicit val y_ = new Y
def hoge {
val x: X = foo
val y: Y = foo
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment