New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scaladoc does not disambiguate between same-named type parameters #3834
Comments
Imported From: https://issues.scala-lang.org/browse/SI-3834?orig=1 |
@dubochet said: The first problem is that map [X] (f: ((A, B)) ⇒ X) : Map[X] This problem is an internal Scaladoc problem. It is not specific to use cases: in fact, the exact same problem appears with the full signature for that method. I don't know how to fix it best. Most likely, it requires a mechanism whereby a type that is transformed using "as seen from" (to adapt it to the local context) should be somehow checked to make sure that the same name does not refer to different symbols at that point. The second problem is specific to use cases. |
@odersky said: |
@paulp said:
/** Builds a new collection by applying a function to all elements of this $$coll.
*
* @param f the function to apply to each element.
* @tparam C the element type of the returned collection.
* @tparam That $$thatinfo
* @param bf $$bfinfo
* @return a new collection of type `That` resulting from applying the given function
* `f` to each element of this $$coll and collecting the results.
*
* @usecase def map[C, That](f: ((A, B)) => C): That
*
* @return a new $$coll resulting from applying the given function
* `f` to each element of this $$coll and collecting the results.
*/
def map[C, That](f: ((A, B)) => C)(implicit bf: CanBuildFrom[This, C, That]): That |
@VladUreche said (edited on Mar 20, 2012 2:29:27 PM UTC): /** ...
* @usecase map [B] (f: ((A, B)) ⇒ B) : $IterableColl[B]
* @usecase map [B,C,D] (f: ((A, B)) ⇒ (C, D)) : $Coll[C, D]
*/
def map [B, That] (f: ((A, B)) ⇒ B)(implicit bf: CanBuildFrom[Map[A, B], B, That]): That If so, I will get the usecase overriding to work and we can assign the bug to the library folks :) |
@VladUreche said: |
in [http://www.scala-lang.org/api/current/scala/collection/Map.html],
def map
has a usecasewhich does not make much sense; it returns a
Map[C, D]
ifB = Pair[C, D]
(which is different thanMap[B]
!), otherwise anIterable[B]
The text was updated successfully, but these errors were encountered: