From 4464a73f7b016366be5ac06283223a1fddeb043f Mon Sep 17 00:00:00 2001 From: odersky Date: Sat, 2 Mar 2024 11:12:07 +0100 Subject: [PATCH] Drop override in SeqFactory Another method that was added for the typesafety demonstration, which should be removed now. --- scala2-library-cc/src/scala/collection/Factory.scala | 9 --------- 1 file changed, 9 deletions(-) diff --git a/scala2-library-cc/src/scala/collection/Factory.scala b/scala2-library-cc/src/scala/collection/Factory.scala index d66ab08e4abb..99f584b972fc 100644 --- a/scala2-library-cc/src/scala/collection/Factory.scala +++ b/scala2-library-cc/src/scala/collection/Factory.scala @@ -296,21 +296,12 @@ object IterableFactory { } } -// !!! Needed to add this separate trait -//trait FreeSeqFactory[+CC[A]] extends IterableFactory[CC]: -// def from[A](source: IterableOnce[A]^): CC[A] -// override def apply[A](elems: A*): CC[A] - -// type FreeSeqFactory[+CC[A] <: SeqOps[A, Seq, Seq[A]]] = SeqFactory[CC] - /** * @tparam CC Collection type constructor (e.g. `List`) */ trait SeqFactory[+CC[A] <: SeqOps[A, Seq, Seq[A]]] extends IterableFactory[CC] { import SeqFactory.UnapplySeqWrapper final def unapplySeq[A](x: CC[A] @uncheckedVariance): UnapplySeqWrapper[A] = new UnapplySeqWrapper(x) // TODO is uncheckedVariance sound here? - def from[A](source: IterableOnce[A]^): CC[A] - override def apply[A](elems: A*): CC[A] = from(elems) } object SeqFactory {