Created
June 30, 2015 12:46
-
-
Save missingfaktor/9af57b6401ff4624d804 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| scala> object Foo { | |
| | implicit def foo(i: Int) = i.toString | |
| | } | |
| warning: there was one feature warning; re-run with -feature for details | |
| defined object Foo | |
| scala> object Bar { | |
| | implicit def foo(s: Symbol) = s.toString | |
| | } | |
| warning: there was one feature warning; re-run with -feature for details | |
| defined object Bar | |
| scala> import Foo._ | |
| import Foo._ | |
| scala> 3: String | |
| res0: String = 3 | |
| scala> import Bar._ | |
| import Bar._ | |
| scala> 3: String | |
| <console>:16: error: type mismatch; | |
| found : Int(3) | |
| required: String | |
| 3: String | |
| ^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment