-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label
Description
Compiler version
3.3.6
Minimized code
object X {
trait Arbitrary[T] {
def f: Some[T]
}
implicit def arbList[T](implicit a: Arbitrary[T]): Arbitrary[List[T]] = ???
}
paste this into a scala file then run scaladoc
this can also be seen in scaladocs for scalacheck.
Output
on the page for trait Arbitrary[T]
, we see

Expectation
the implicitly-added method actually comes from an Arbitrary[List[T]]
and so the return type of its f
should be Some[List[T]]
.
this is related to #17599 but the incorrect typing is new. as noted there, the "implicitly added" methods are actually not callable. so, if you try to use x.f
, you will get a value of type Some[T]
which matches the scaladoc. but then, it is incorrect to say that a method with such a signature is provided by arbList - it is not.
Metadata
Metadata
Assignees
Labels
itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label