Created
June 12, 2011 21:32
-
-
Save dcaoyuan/1022007 to your computer and use it in GitHub Desktop.
erase method of implicit parameter
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
scala> def p(implicit i:Int) = print(i) | |
p: (implicit i: Int)Unit | |
scala> p(i) | |
3 | |
scala> def p = print("no implicit p(i) any more") | |
p: Unit | |
scala> p | |
no implicit p(i) any more | |
scala> p(1) | |
<console>:7: error: p of type Unit does not take parameters | |
p(1) | |
^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment