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

Conversation

@lrytz
Copy link
Member

@lrytz lrytz commented Jan 26, 2018

scala> class Lst[+A] {
     |   def map[B, That](f: A => B)(implicit bf: strawman.collection.BuildFrom[Lst[A], B, That]): That = scala.Predef.???
     | }
defined class Lst

scala> object Test {
     |   def foo(l: Lst[scala.Int]) = l.map[scala.Int, Lst[scala.Predef.String]](x => 1)
     | }
         def foo(l: Lst[scala.Int]) = l.map[scala.Int, Lst[scala.Predef.String]](x => 1)
                                                                                ^
On line 2: error: Cannot construct a collection of type Lst[String] with elements of type Int based on a collection of type Lst[Int].

This is an existing test case in scala/scala: https://github.com/scala/scala/blob/2.13.x/test/files/neg/t2462a.check

@lrytz lrytz requested a review from julienrf January 26, 2018 11:09
@julienrf julienrf merged commit 0767dbe into scala:master Jan 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants