blob: e296a17c7883dbee385862f04dab543d9b10842c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
trait A[@specialized(Int) T] {
var value: T
def getWith[@specialized(Int) Z](f: T => Z) = f(value)
}
class C extends A[Int] {
var value = 10
override def getWith[@specialized(Int) Z](f: Int => Z) = f(value)
}
|