Skip to content

Instantly share code, notes, and snippets.

@dcaoyuan
Created June 12, 2011 21:32
Show Gist options
  • Save dcaoyuan/1022007 to your computer and use it in GitHub Desktop.
Save dcaoyuan/1022007 to your computer and use it in GitHub Desktop.
erase method of implicit parameter
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