blob: 7388e53e3ecca1e2b1e4f9acaf503d21da01793d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import scala.reflect.{ArrayTag, arrayTag}
abstract class A[T, @specialized(scala.Int) U : ArrayTag] {
def f(state: T): Array[U]
}
abstract class B extends A[ Array[Byte], Int ] {
type T = Array[Byte]
type U = Int
val N = 0
def f(state: T): Array[U] =
{
new Array[U](N + state(N))
}
}
|