Skip to content

Commit

Permalink
Move sources from tests/pos-special/stdlib to scala2-library-cc
Browse files Browse the repository at this point in the history
Also reduce diff with the original Scala 2 library sources.
  • Loading branch information
nicolasstucki committed Dec 21, 2023
1 parent d0c4817 commit 5c6e542
Show file tree
Hide file tree
Showing 151 changed files with 119 additions and 264 deletions.
3 changes: 3 additions & 0 deletions compiler/test/dotty/Properties.scala
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ object Properties {

/** If we are using the scala-library TASTy jar */
def usingScalaLibraryTasty: Boolean = scalaLibraryTasty.isDefined
/** If we are using the scala-library TASTy jar */

def usingScalaLibraryCCTasty: Boolean = scalaLibraryTasty.exists(_.contains("scala2-library-cc-tasty"))

/** scala-asm jar */
def scalaAsm: String = sys.props("dotty.tests.classes.scalaAsm")
Expand Down
6 changes: 3 additions & 3 deletions compiler/test/dotty/tools/dotc/CompilationTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class CompilationTests {
compileFilesInDir("tests/pos", defaultOptions.and("-Ysafe-init", "-Ylegacy-lazy-vals", "-Ycheck-constraint-deps"), FileFilter.include(TestSources.posLazyValsAllowlist)),
compileDir("tests/pos-special/java-param-names", defaultOptions.withJavacOnlyOptions("-parameters")),
) ::: (
// FIXME: This fails due to a bug involving self types and capture checking
if Properties.usingScalaLibraryTasty then Nil
else List(compileDir("tests/pos-special/stdlib", allowDeepSubtypes))
// TODO create a folder for capture checking tests with the stdlib, or use tests/pos-custom-args/captures under this mode?
if Properties.usingScalaLibraryCCTasty then List(compileDir("tests/pos-special/stdlib", allowDeepSubtypes))
else Nil
)

if scala.util.Properties.isJavaAtLeast("16") then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ object ArrayOps {
b.result()
}

def flatMap[BS, B](f: A => BS)(implicit asIterable: BS => Iterable[B], m: ClassTag[B]): Array[B] =
def flatMap[BS, B](f: A => BS)(implicit asIterable: BS => Iterable[B], m: ClassTag[B]): Array[B] =
flatMap[B](x => asIterable(f(x)))

/** Creates a new non-strict filter which combines this filter with the given predicate. */
Expand Down Expand Up @@ -505,7 +505,7 @@ final class ArrayOps[A](private val xs: Array[A]) extends AnyVal {
*
* @return a pair of arrays: the first one made of those values returned by `f` that were wrapped in [[scala.util.Left]],
* and the second one made of those wrapped in [[scala.util.Right]]. */
def partitionMap[A1: ClassTag, A2: ClassTag](f: A => Either[A1, A2]): (Array[A1], Array[A2]) = {
def partitionMap[A1: ClassTag, A2: ClassTag](f: A => Either[A1, A2]): (Array[A1], Array[A2]) = {
val res1 = ArrayBuilder.make[A1]
val res2 = ArrayBuilder.make[A2]
var i = 0
Expand Down Expand Up @@ -816,7 +816,7 @@ final class ArrayOps[A](private val xs: Array[A]) extends AnyVal {
* }}}
*
*/
def scanLeft[B : ClassTag](z: B)(op: (B, A) => B): Array[B] = {
def scanLeft[ B : ClassTag ](z: B)(op: (B, A) => B): Array[B] = {
var v = z
var i = 0
val res = new Array[B](xs.length + 1)
Expand Down Expand Up @@ -855,7 +855,7 @@ final class ArrayOps[A](private val xs: Array[A]) extends AnyVal {
* }}}
*
*/
def scanRight[B : ClassTag](z: B)(op: (A, B) => B): Array[B] = {
def scanRight[ B : ClassTag ](z: B)(op: (A, B) => B): Array[B] = {
var v = z
var i = xs.length - 1
val res = new Array[B](xs.length + 1)
Expand Down Expand Up @@ -973,7 +973,7 @@ final class ArrayOps[A](private val xs: Array[A]) extends AnyVal {
b.result()
}

def flatMap[BS, B](f: A => BS)(implicit asIterable: BS => Iterable[B], m: ClassTag[B]): Array[B] =
def flatMap[BS, B](f: A => BS)(implicit asIterable: BS => Iterable[B], m: ClassTag[B]): Array[B] =
flatMap[B](x => asIterable(f(x)))

/** Flattens a two-dimensional array by concatenating all its rows
Expand Down Expand Up @@ -1095,7 +1095,7 @@ final class ArrayOps[A](private val xs: Array[A]) extends AnyVal {
* If this array is shorter than `that`, `thisElem` values are used to pad the result.
* If `that` is shorter than this array, `thatElem` values are used to pad the result.
*/
def zipAll[A1 >: A, B](that: Iterable[B], thisElem: A1, thatElem: B): Array[(A1, B)] = {
def zipAll[A1 >: A, B](that: Iterable[B], thisElem: A1, thatElem: B): Array[(A1, B)] = {
val b = new ArrayBuilder.ofRef[(A1, B)]()
val k = that.knownSize
b.sizeHint(max(k, xs.length))
Expand Down Expand Up @@ -1244,7 +1244,7 @@ final class ArrayOps[A](private val xs: Array[A]) extends AnyVal {
* @return a pair of Arrays, containing, respectively, the first and second half
* of each element pair of this Array.
*/
def unzip[A1, A2](implicit asPair: A => (A1, A2), ct1: ClassTag[A1], ct2: ClassTag[A2]): (Array[A1], Array[A2]) = {
def unzip[A1, A2](implicit asPair: A => (A1, A2), ct1: ClassTag[A1], ct2: ClassTag[A2]): (Array[A1], Array[A2]) = {
val a1 = new Array[A1](xs.length)
val a2 = new Array[A2](xs.length)
var i = 0
Expand Down Expand Up @@ -1273,7 +1273,7 @@ final class ArrayOps[A](private val xs: Array[A]) extends AnyVal {
* @return a triple of Arrays, containing, respectively, the first, second, and third
* elements from each element triple of this Array.
*/
def unzip3[A1, A2, A3](implicit asTriple: A => (A1, A2, A3), ct1: ClassTag[A1], ct2: ClassTag[A2],
def unzip3[A1, A2, A3](implicit asTriple: A => (A1, A2, A3), ct1: ClassTag[A1], ct2: ClassTag[A2],
ct3: ClassTag[A3]): (Array[A1], Array[A2], Array[A3]) = {
val a1 = new Array[A1](xs.length)
val a2 = new Array[A2](xs.length)
Expand Down Expand Up @@ -1418,7 +1418,7 @@ final class ArrayOps[A](private val xs: Array[A]) extends AnyVal {
* @tparam K the type of keys returned by the discriminator function
* @tparam B the type of values returned by the transformation function
*/
def groupMap[K, B : ClassTag](key: A => K)(f: A => B): immutable.Map[K, Array[B]] = {
def groupMap[K, B : ClassTag](key: A => K)(f: A => B): immutable.Map[K, Array[B]] = {
val m = mutable.Map.empty[K, ArrayBuilder[B]]
val len = xs.length
var i = 0
Expand Down Expand Up @@ -1479,7 +1479,8 @@ final class ArrayOps[A](private val xs: Array[A]) extends AnyVal {
/** Create a copy of this array with the specified element type. */
def toArray[B >: A: ClassTag]: Array[B] = {
val destination = new Array[B](xs.length)
copyToArray(destination, 0)
@annotation.unused val copied = copyToArray(destination, 0)
//assert(copied == xs.length)
destination
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ object BuildFrom extends BuildFromLowPriority1 {
def newBuilder(from: Array[_]): Builder[A, Array[A]] = Factory.arrayFactory[A].newBuilder
}

implicit def buildFromView[A, B]: BuildFrom[View[A], B, View[B]] =
implicit def buildFromView[A, B]: BuildFrom[View[A], B, View[B]] =
new BuildFrom[View[A], B, View[B]] {
def fromSpecific(from: View[A])(it: IterableOnce[B]^): View[B] = View.from(it).unsafeAssumePure
def newBuilder(from: View[A]): Builder[B, View[B]] = View.newBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,25 @@ trait IndexedSeqOps[+A, +CC[_], +C] extends Any with IndexedSeqViewOps[A, CC, C]

override def slice(from: Int, until: Int): C = fromSpecific(new IndexedSeqView.Slice(this, from, until))

override def head: A = apply(0)
override def head: A =
if (!isEmpty) apply(0)
else throw new NoSuchElementException(s"head of empty ${
self match {
case self: IndexedSeq[_] => self.collectionClassName
case _ => toString
}
}")

override def headOption: Option[A] = if (isEmpty) None else Some(head)

override def last: A = apply(length - 1)
override def last: A =
if (!isEmpty) apply(length - 1)
else throw new NoSuchElementException(s"last of empty ${
self match {
case self: IndexedSeq[_] => self.collectionClassName
case _ => toString
}
}")

// We already inherit an efficient `lastOption = if (isEmpty) None else Some(last)`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import scala.collection.mutable.StringBuilder
import scala.language.implicitConversions
import scala.math.{Numeric, Ordering}
import scala.reflect.ClassTag
import scala.runtime.AbstractFunction2
import scala.runtime.{AbstractFunction1, AbstractFunction2}
import language.experimental.captureChecking

/**
Expand Down Expand Up @@ -272,7 +272,7 @@ object IterableOnce {
math.max(math.min(math.min(len, srcLen), destLen - start), 0)

/** Calls `copyToArray` on the given collection, regardless of whether or not it is an `Iterable`. */
@inline private[collection] def copyElemsToArray[A, B >: A](
@inline private[collection] def copyElemsToArray[A, B >: A](
elems: IterableOnce[A]^,
xs: Array[B],
start: Int = 0,
Expand Down Expand Up @@ -1117,8 +1117,8 @@ trait IterableOnceOps[+A, +CC[_], +C] extends Any { this: IterableOnce[A]^ =>
def collectFirst[B](pf: PartialFunction[A, B]): Option[B] = {
// Presumably the fastest way to get in and out of a partial function is for a sentinel function to return itself
// (Tested to be lower-overhead than runWith. Would be better yet to not need to (formally) allocate it)
val sentinel: scala.Function1[A, Any] = new scala.runtime.AbstractFunction1[A, Any] {
def apply(a: A) = this
val sentinel: scala.Function1[A, Any] = new AbstractFunction1[A, Any] {
def apply(a: A): AbstractFunction1[A, Any] = this
}
val it = iterator
while (it.hasNext) {
Expand Down Expand Up @@ -1322,7 +1322,8 @@ trait IterableOnceOps[+A, +CC[_], +C] extends Any { this: IterableOnce[A]^ =>
def toArray[B >: A: ClassTag]: Array[B] =
if (knownSize >= 0) {
val destination = new Array[B](knownSize)
copyToArray(destination, 0)
@annotation.unused val copied = copyToArray(destination, 0)
//assert(copied == destination.length)
destination
}
else mutable.ArrayBuilder.make[B].addAll(this).result()
Expand Down Expand Up @@ -1362,4 +1363,4 @@ object IterableOnceOps:
m
}
}
end IterableOnceOps
end IterableOnceOps
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ object MapView extends MapViewFactory {
override def isEmpty: Boolean = underlying.isEmpty
}

override def newBuilder[X, Y]: Builder[(X, Y), MapView[X, Y]] = mutable.HashMap.newBuilder[X, Y].mapResult(_.view)
override def newBuilder[X, Y]: Builder[(X, Y), MapView[X, Y]] = mutable.HashMap.newBuilder[X, Y].mapResult(_.view)

override def empty[K, V]: MapView[K, V] = EmptyMapView.asInstanceOf[MapView[K, V]]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ trait SortedSetOps[A, +CC[X] <: SortedSet[X], +C <: SortedSetOps[A, CC, C]]
* @param start The lower-bound (inclusive) of the iterator
*/
def iteratorFrom(start: A): Iterator[A]

@deprecated("Use `iteratorFrom` instead.", "2.13.0")
@`inline` def keysIteratorFrom(start: A): Iterator[A] = iteratorFrom(start)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ private[scala] object StringParsers {
else None
}
}

//floating point
final def checkFloatFormat(format: String): Boolean = {
//indices are tracked with a start index which points *at* the first index
Expand All @@ -194,7 +193,6 @@ private[scala] object StringParsers {
rec(from)
}


def isHexFloatLiteral(startIndex: Int, endIndex: Int): Boolean = {
def isHexDigit(ch: Char) = ((ch >= '0' && ch <= '9') ||
(ch >= 'a' && ch <= 'f') ||
Expand Down Expand Up @@ -232,7 +230,6 @@ private[scala] object StringParsers {
val pIndex = format.indexWhere(ch => ch == 'p' || ch == 'P', startIndex)
(pIndex <= endIndex) && prefixOK(startIndex, pIndex) && postfixOK(pIndex + 1, endIndex)
}

def isDecFloatLiteral(startIndex: Int, endIndex: Int): Boolean = {
//invariant: endIndex > startIndex

Expand Down Expand Up @@ -279,7 +276,6 @@ private[scala] object StringParsers {
//count 0x00 to 0x20 as "whitespace", and nothing else
val unspacedStart = format.indexWhere(ch => ch.toInt > 0x20)
val unspacedEnd = format.lastIndexWhere(ch => ch.toInt > 0x20) + 1

if (unspacedStart == -1 || unspacedStart >= unspacedEnd || unspacedEnd <= 0) false
else {
//all formats can have a sign
Expand All @@ -306,7 +302,6 @@ private[scala] object StringParsers {
}
}
}

@inline
def parseFloat(from: String): Option[Float] =
if (checkFloatFormat(from)) Some(java.lang.Float.parseFloat(from))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ private[immutable] abstract class ChampBaseIterator[T <: Node[T]] {
// ChampBaseReverseIterator and in convert.impl.ChampStepperBase.
// If you change this code, check those also in case they also
// need to be modified.

protected var currentValueCursor: Int = 0
protected var currentValueLength: Int = 0
protected var currentValueNode: T = _
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,18 +303,18 @@ object TreeSeqMap extends MapFactory[TreeSeqMap] {
else EmptyByInsertion
}.asInstanceOf[TreeSeqMap[K, V]]

def from[K, V](it: collection.IterableOnce[(K, V)]^): TreeSeqMap[K, V] =
def from[K, V](it: collection.IterableOnce[(K, V)]^): TreeSeqMap[K, V] =
it match {
case om: TreeSeqMap[K, V] => om
case _ => (newBuilder[K, V] ++= it).result()
}

@inline private def increment(ord: Int) = if (ord == Int.MaxValue) Int.MinValue else ord + 1

def newBuilder[K, V]: mutable.Builder[(K, V), TreeSeqMap[K, V]] = newBuilder(OrderBy.Insertion)
def newBuilder[K, V](orderedBy: OrderBy): mutable.Builder[(K, V), TreeSeqMap[K, V]] = new Builder[K, V](orderedBy)
def newBuilder[K, V]: mutable.Builder[(K, V), TreeSeqMap[K, V]] = newBuilder(OrderBy.Insertion)
def newBuilder[K, V](orderedBy: OrderBy): mutable.Builder[(K, V), TreeSeqMap[K, V]] = new Builder[K, V](orderedBy)

final class Builder[K, V](orderedBy: OrderBy) extends mutable.Builder[(K, V), TreeSeqMap[K, V]] {
final class Builder[K, V](orderedBy: OrderBy) extends mutable.Builder[(K, V), TreeSeqMap[K, V]] {
private[this] val bdr = new MapBuilderImpl[K, (Int, V)]
private[this] var ong = Ordering.empty[K]
private[this] var ord = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import language.experimental.captureChecking
* rapidly as 2^30^ is approached.
*
*/
class AnyRefMap[K <: AnyRef, V] private[collection] (defaultEntry: K -> V, initialBufferSize: Int, initBlank: Boolean)
class AnyRefMap[K <: AnyRef, V] private[collection] (defaultEntry: K -> V, initialBufferSize: Int, initBlank: Boolean)
extends AbstractMap[K, V]
with MapOps[K, V, Map, AnyRefMap[K, V]]
with StrictOptimizedIterableOps[(K, V), Iterable, AnyRefMap[K, V]]
Expand Down Expand Up @@ -478,11 +478,11 @@ class AnyRefMap[K <: AnyRef, V] private[collection] (defaultEntry: K -> V, init
}

// The implicit dummy parameter is necessary to distinguish these methods from the base methods they overload (not override)
def map[K2 <: AnyRef, V2](f: ((K, V)) => (K2, V2))(implicit dummy: DummyImplicit): AnyRefMap[K2, V2] =
def map[K2 <: AnyRef, V2](f: ((K, V)) => (K2, V2))(implicit dummy: DummyImplicit): AnyRefMap[K2, V2] =
AnyRefMap.from(new View.Map(this, f))
def flatMap[K2 <: AnyRef, V2](f: ((K, V)) => IterableOnce[(K2, V2)])(implicit dummy: DummyImplicit): AnyRefMap[K2, V2] =
def flatMap[K2 <: AnyRef, V2](f: ((K, V)) => IterableOnce[(K2, V2)])(implicit dummy: DummyImplicit): AnyRefMap[K2, V2] =
AnyRefMap.from(new View.FlatMap(this, f))
def collect[K2 <: AnyRef, V2](pf: PartialFunction[(K, V), (K2, V2)])(implicit dummy: DummyImplicit): AnyRefMap[K2, V2] =
def collect[K2 <: AnyRef, V2](pf: PartialFunction[(K, V), (K2, V2)])(implicit dummy: DummyImplicit): AnyRefMap[K2, V2] =
strictOptimizedCollect(AnyRefMap.newBuilder[K2, V2], pf)

override def clear(): Unit = {
Expand Down Expand Up @@ -515,7 +515,7 @@ object AnyRefMap {
*
* This builder can be reused to create multiple instances.
*/
final class AnyRefMapBuilder[K <: AnyRef, V] extends ReusableBuilder[(K, V), AnyRefMap[K, V]] {
final class AnyRefMapBuilder[K <: AnyRef, V] extends ReusableBuilder[(K, V), AnyRefMap[K, V]] {
private[collection] var elems: AnyRefMap[K, V] = new AnyRefMap[K, V]
def addOne(entry: (K, V)): this.type = {
elems += entry
Expand All @@ -527,11 +527,11 @@ object AnyRefMap {
}

/** Creates a new `AnyRefMap` with zero or more key/value pairs. */
def apply[K <: AnyRef, V](elems: (K, V)*): AnyRefMap[K, V] = buildFromIterableOnce(elems)
def apply[K <: AnyRef, V](elems: (K, V)*): AnyRefMap[K, V] = buildFromIterableOnce(elems)

def newBuilder[K <: AnyRef, V]: ReusableBuilder[(K, V), AnyRefMap[K, V]] = new AnyRefMapBuilder[K, V]
def newBuilder[K <: AnyRef, V]: ReusableBuilder[(K, V), AnyRefMap[K, V]] = new AnyRefMapBuilder[K, V]

private def buildFromIterableOnce[K <: AnyRef, V](elems: IterableOnce[(K, V)]^): AnyRefMap[K, V] = {
private def buildFromIterableOnce[K <: AnyRef, V](elems: IterableOnce[(K, V)]^): AnyRefMap[K, V] = {
var sz = elems.knownSize
if(sz < 0) sz = 4
val arm = new AnyRefMap[K, V](sz * 2)
Expand All @@ -541,10 +541,10 @@ object AnyRefMap {
}

/** Creates a new empty `AnyRefMap`. */
def empty[K <: AnyRef, V]: AnyRefMap[K, V] = new AnyRefMap[K, V]
def empty[K <: AnyRef, V]: AnyRefMap[K, V] = new AnyRefMap[K, V]

/** Creates a new empty `AnyRefMap` with the supplied default */
def withDefault[K <: AnyRef, V](default: K -> V): AnyRefMap[K, V] = new AnyRefMap[K, V](default)
def withDefault[K <: AnyRef, V](default: K -> V): AnyRefMap[K, V] = new AnyRefMap[K, V](default)

/** Creates a new `AnyRefMap` from an existing source collection. A source collection
* which is already an `AnyRefMap` gets cloned.
Expand All @@ -554,15 +554,15 @@ object AnyRefMap {
* @tparam V the type of the values
* @return a new `AnyRefMap` with the elements of `source`
*/
def from[K <: AnyRef, V](source: IterableOnce[(K, V)]^): AnyRefMap[K, V] = source match {
def from[K <: AnyRef, V](source: IterableOnce[(K, V)]^): AnyRefMap[K, V] = source match {
case source: AnyRefMap[_, _] => source.clone().asInstanceOf[AnyRefMap[K, V]]
case _ => buildFromIterableOnce(source)
}

/** Creates a new `AnyRefMap` from arrays of keys and values.
* Equivalent to but more efficient than `AnyRefMap((keys zip values): _*)`.
*/
def fromZip[K <: AnyRef, V](keys: Array[K], values: Array[V]): AnyRefMap[K, V] = {
def fromZip[K <: AnyRef, V](keys: Array[K], values: Array[V]): AnyRefMap[K, V] = {
val sz = math.min(keys.length, values.length)
val arm = new AnyRefMap[K, V](sz * 2)
var i = 0
Expand All @@ -574,7 +574,7 @@ object AnyRefMap {
/** Creates a new `AnyRefMap` from keys and values.
* Equivalent to but more efficient than `AnyRefMap((keys zip values): _*)`.
*/
def fromZip[K <: AnyRef, V](keys: Iterable[K]^, values: Iterable[V]^): AnyRefMap[K, V] = {
def fromZip[K <: AnyRef, V](keys: Iterable[K]^, values: Iterable[V]^): AnyRefMap[K, V] = {
val sz = math.min(keys.size, values.size)
val arm = new AnyRefMap[K, V](sz * 2)
val ki = keys.iterator
Expand All @@ -584,20 +584,20 @@ object AnyRefMap {
arm
}

implicit def toFactory[K <: AnyRef, V](dummy: AnyRefMap.type): Factory[(K, V), AnyRefMap[K, V]] = ToFactory.asInstanceOf[Factory[(K, V), AnyRefMap[K, V]]]
implicit def toFactory[K <: AnyRef, V](dummy: AnyRefMap.type): Factory[(K, V), AnyRefMap[K, V]] = ToFactory.asInstanceOf[Factory[(K, V), AnyRefMap[K, V]]]

@SerialVersionUID(3L)
private[this] object ToFactory extends Factory[(AnyRef, AnyRef), AnyRefMap[AnyRef, AnyRef]] with Serializable {
def fromSpecific(it: IterableOnce[(AnyRef, AnyRef)]^): AnyRefMap[AnyRef, AnyRef] = AnyRefMap.from[AnyRef, AnyRef](it)
def newBuilder: Builder[(AnyRef, AnyRef), AnyRefMap[AnyRef, AnyRef]] = AnyRefMap.newBuilder[AnyRef, AnyRef]
}

implicit def toBuildFrom[K <: AnyRef, V](factory: AnyRefMap.type): BuildFrom[Any, (K, V), AnyRefMap[K, V]] = ToBuildFrom.asInstanceOf[BuildFrom[Any, (K, V), AnyRefMap[K, V]]]
implicit def toBuildFrom[K <: AnyRef, V](factory: AnyRefMap.type): BuildFrom[Any, (K, V), AnyRefMap[K, V]] = ToBuildFrom.asInstanceOf[BuildFrom[Any, (K, V), AnyRefMap[K, V]]]
private[this] object ToBuildFrom extends BuildFrom[Any, (AnyRef, AnyRef), AnyRefMap[AnyRef, AnyRef]] {
def fromSpecific(from: Any)(it: IterableOnce[(AnyRef, AnyRef)]^) = AnyRefMap.from(it)
def newBuilder(from: Any) = AnyRefMap.newBuilder[AnyRef, AnyRef]
}

implicit def iterableFactory[K <: AnyRef, V]: Factory[(K, V), AnyRefMap[K, V]] = toFactory[K, V](this)
implicit def buildFromAnyRefMap[K <: AnyRef, V]: BuildFrom[AnyRefMap[_, _], (K, V), AnyRefMap[K, V]] = toBuildFrom(this)
implicit def iterableFactory[K <: AnyRef, V]: Factory[(K, V), AnyRefMap[K, V]] = toFactory[K, V](this)
implicit def buildFromAnyRefMap[K <: AnyRef, V]: BuildFrom[AnyRefMap[_, _], (K, V), AnyRefMap[K, V]] = toBuildFrom(this)
}
Loading

0 comments on commit 5c6e542

Please sign in to comment.