Skip to content

Commit

Permalink
Add ClassTag context bounds to OpenHashMap type params.
Browse files Browse the repository at this point in the history
  • Loading branch information
performantdata committed Apr 24, 2016
1 parent 9138238 commit 880df50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/junit/scala/collection/SetMapConsistencyTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import scala.collection.JavaConverters._
/* Tests various maps by making sure they all agree on the same answers. */
@RunWith(classOf[JUnit4])
class SetMapConsistencyTest {
import scala.reflect.ClassTag

trait MapBox[A] {
protected def oor(s: String, n: Int) = throw new IllegalArgumentException(s"Out of range for $s: $n")
Expand Down Expand Up @@ -65,7 +66,7 @@ class SetMapConsistencyTest {

def boxMhm[A] = new BoxMutableMap[A, cm.HashMap[A, Int]](new cm.HashMap[A, Int], "mutable.HashMap")

def boxMohm[A] = new BoxMutableMap[A, cm.OpenHashMap[A, Int]](new cm.OpenHashMap[A, Int], "mutable.OpenHashMap")
def boxMohm[A : ClassTag] = new BoxMutableMap[A, cm.OpenHashMap[A, Int]](new cm.OpenHashMap[A, Int], "mutable.OpenHashMap")

def boxMtm[A: Ordering] = new BoxMutableMap[A, cm.TreeMap[A, Int]](new cm.TreeMap[A, Int], "mutable.TreeMap")

Expand Down

0 comments on commit 880df50

Please sign in to comment.