Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case class Special(v: String)
- object Special {
- import scala.language.implicitConversions
- implicit def specialiser(v: String): Special = Special(v)
- }
- object Main {
- def method(a: Special) = {
- println(a)
- }
- def main(args: Array[String]) = {
- method("needs to be special")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement