blob: 007a64c8f1de58a2f41e077f4452c6372f6e21b6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
// scala: the signature in the abstract class will use the
// upper bound as return type, which for us will be Integer
// since primitives can't appear in bounds.
abstract class AC[T <: Int] {
def f(): T
}
class Bippy extends AC[Int] {
def f(): Int = 5
}
|