Created
July 7, 2011 13:40
-
-
Save taku0/1069525 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// これは通る | |
class Foo { | |
def foo { | |
implicitly[Bar](Bar.bar) | |
implicitly[Bar] | |
} | |
} | |
class Bar | |
object Bar { | |
implicit val bar = new Bar | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// これは通らない | |
class Foo { | |
def foo { | |
implicitly[Bar] | |
} | |
} | |
class Bar | |
object Bar { | |
implicit val bar = new Bar | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// これは通る | |
class Foo { | |
def foo { | |
implicitly[Bar] | |
} | |
} | |
class Bar | |
object Bar { | |
implicit val bar: Bar = new Bar | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// これは通らない | |
class Foo { | |
def foo { | |
implicitly[Bar] | |
} | |
} | |
class Bar | |
object Bar { | |
val b: Bar = new Bar | |
implicit val bar = b | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// これは通る | |
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