Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trait MyWrapperBound {
- val message: String
- }
- def wrap[T <: MyWrapperBound](message: String): T
- def wrap[T <: MyWrapperBound](message: String)(implicit factory: String => T): T
- case class SimpleBound(message: String) extends MyWrapperBound
- object SimpleBound {
- implicit def factory(message: String): SimpleBound = SimpleBound(message)
- }
- def wrap[T <: MyWrapperBound](message: String)(implicit factory: String => T): T = macro ...
Add Comment
Please, Sign In to add comment