Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #373 from lrytz/buildFromNotFound
Browse files Browse the repository at this point in the history
implicitNotFound for BuildFrom
  • Loading branch information
julienrf authored Jan 29, 2018
2 parents 172ccb2 + 3149572 commit 0767dbe
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package strawman.collection
import scala.{Any, Ordering, deprecated, `inline`}

import strawman.collection.mutable.Builder
import scala.annotation.implicitNotFound

/** Builds a collection of type `C` from elements of type `A` when a source collection of type `From` is available.
* Implicit instances of `BuildFrom` are available for all collection types.
Expand All @@ -11,6 +12,7 @@ import strawman.collection.mutable.Builder
* @tparam A Type of elements (e.g. `Int`, `Boolean`, etc.)
* @tparam C Type of collection (e.g. `List[Int]`, `TreeMap[Int, String]`, etc.)
*/
@implicitNotFound(msg = "Cannot construct a collection of type ${C} with elements of type ${A} based on a collection of type ${From}.")
trait BuildFrom[-From, -A, +C] extends Any {
def fromSpecificIterable(from: From)(it: Iterable[A]): C

Expand Down

0 comments on commit 0767dbe

Please sign in to comment.