http://sassa-nf.livejournal.com/ ([identity profile] sassa-nf.livejournal.com) wrote in [personal profile] juan_gandhi 2013-01-24 11:55 am (UTC)

спасибо.

а почему implicit вот такого вида не работает:
implicit def safeCast[X,Y, _ >: X <: Y]( x:X ):Y = x.asInstanceOf[Y]
case class L[X](val x: X) { def double[_ >: X <: Int] = x*2 }

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting