aboutsummaryrefslogblamecommitdiff
path: root/tests/pos/spec-constr-new.scala
blob: c6acc862a0efdae4f2d5676444493a4431628216 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                                                           
import scala.reflect.{ClassTag, classTag}

class SparseArray2[@specialized(Int) T:ClassTag](val maxSize: Int, initialLength:Int = 3) {
  private var data = new Array[T](initialLength);
  private var index = new Array[Int](initialLength);

  // comment out to compile correctly
  data.length + 3;
}