diff --git a/build.sbt b/build.sbt index d5ec8e5..bdfd39e 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,4 @@ -ThisBuild / scalaVersion := "2.13.15" +ThisBuild / scalaVersion := "2.13.16" ThisBuild / scalacOptions ++= Seq("-unchecked", "-feature", "-deprecation") ThisBuild / libraryDependencies ++= Seq( "org.scala-lang" % "scala-reflect" % scalaVersion.value, diff --git a/laws/src/main/scala/Generator.scala b/laws/src/main/scala/Generator.scala index 203ded9..66427ae 100644 --- a/laws/src/main/scala/Generator.scala +++ b/laws/src/main/scala/Generator.scala @@ -472,12 +472,8 @@ object AllStrLongGenerators { val weakHashMap = register(io.MutKV)(_.weakHashMap()) } - object MutKrefV { - val anyRefMap = register(io.MutKrefV)(_.anyRefMap()) - } - /** This line is needed to actually perform the registration of all generators! */ - val force = ImmKV :: MutKV :: MutKrefV :: Nil + val force = ImmKV :: MutKV :: Nil lazy val all = everyoneBuffer.result() diff --git a/laws/src/main/scala/Instantiator.scala b/laws/src/main/scala/Instantiator.scala index ef7acb1..2f7b92f 100644 --- a/laws/src/main/scala/Instantiator.scala +++ b/laws/src/main/scala/Instantiator.scala @@ -509,30 +509,6 @@ object InstantiatorsOfStrLong extends InstantiatorsOf[(String, Long)] with Insta protected implicit def classTagA: ClassTag[(String, Long)] = ClassTagSource.classTagStringLong protected def allFlags = Array[Flag]() - protected implicit val sizeOfAnyRefMap_String_Long: Sizable[collection.mutable.AnyRefMap[String, Long]] = - new Sizable[collection.mutable.AnyRefMap[String, Long]] { - def sizeof(m: collection.mutable.AnyRefMap[String, Long]) = m.size - } - - object MutKrefV extends Instance.PackagePath { - // If we have other (String, _) types, move this out into a trait - def nickname = "MutKrefV" - def fullyQualified = "scala.collection.mutable" - def C[CC: TypeTag: Sizable](ccf: Array[(String, Long)] => CC, flags: Flag*)(implicit nm: sourcecode.Name): Deployed[(String, Long), CC] = { - val gen = kvInst.makeWith(ccf, (MAP +: flags): _*)(nm, implicitly[TypeTag[CC]], implicitly[Sizable[CC]]) - val ans = new Deployed[(String, Long), CC]{ - val secretly = gen - var accesses: Int = 0 - val name = nm.value.toString - def group = typeTagA.tpe.toString + " in " + nickname - def apply(): Instance.FromArray[(String, Long), CC] = { accesses += 1; secretly } - } - registry += ans - ans - } - val anyRefMap = C({ a => val m = new collection.mutable.AnyRefMap[String, Long]; for (kv <- a) m += kv; m }, SPECTYPE) - } - lazy val possible_a = Array("wish" -> 3L) lazy val possible_x = Array( Array.empty[(String, Long)], @@ -547,5 +523,5 @@ object InstantiatorsOfStrLong extends InstantiatorsOf[(String, Long)] with Insta * * In particular, notice that we're only taking the key-value instantiators, so we only register maps, not all collections. */ - val force = ImmKV :: MutKV :: MutKrefV :: Nil + val force = ImmKV :: MutKV :: Nil } diff --git a/laws/src/main/scala/Runner.scala b/laws/src/main/scala/Runner.scala index 212d0fd..5712c63 100644 --- a/laws/src/main/scala/Runner.scala +++ b/laws/src/main/scala/Runner.scala @@ -164,7 +164,7 @@ trait AllRunner { import scala.concurrent.duration._ import scala.concurrent.ExecutionContext.Implicits.global // Maybe make a fixed-size thread pool? val toRun = runners.map(_()) - val ans = collection.mutable.AnyRefMap.empty[String, Test.Tested] + val ans = collection.mutable.Map.empty[String, Test.Tested] val slots = new Array[(String, Future[(String, Test.Tested)])](1 max (atOnce min toRun.length)) var i = 0; var it = toRun.iterator