Skip to content

Instantly share code, notes, and snippets.

@taku0
Created July 7, 2011 13:40
Show Gist options
  • Save taku0/1069525 to your computer and use it in GitHub Desktop.
Save taku0/1069525 to your computer and use it in GitHub Desktop.
// これは通る
class Foo {
def foo {
implicitly[Bar](Bar.bar)
implicitly[Bar]
}
}
class Bar
object Bar {
implicit val bar = new Bar
}
// これは通らない
class Foo {
def foo {
implicitly[Bar]
}
}
class Bar
object Bar {
implicit val bar = new Bar
}
// これは通る
class Foo {
def foo {
implicitly[Bar]
}
}
class Bar
object Bar {
implicit val bar: Bar = new Bar
}
// これは通らない
class Foo {
def foo {
implicitly[Bar]
}
}
class Bar
object Bar {
val b: Bar = new Bar
implicit val bar = b
}
// これは通る
class Bar
object Bar {
implicit val bar: Bar = new Bar
}
class Foo {
def foo {
implicitly[Bar]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment