bug
bug copied to clipboard
Type params ScalaDoc for PartialFunction.compose incorrectly fused
The ScalaDoc for scala.PartialFunction.compose incorrectly limits the parameter type parameter for g to the same type parameter as itself.
Current: def compose[A](g: (A) ⇒ A): (A) ⇒ B |
Suggested Correction: def compose[C](g: (C) ⇒ A): (C) ⇒ B |
The parameter descriptions are also misleading.
| tparam/param | description | note |
|---|---|---|
| A | the type to which function g can be applied | Instead of A a new name should be used |
| g | a function A => T1 | Should be something similar to a function C => A |
Imported From: https://issues.scala-lang.org/browse/SI-9430?orig=1 Reporter: @janekdb Affected Versions: 2.11.7
Still a bug in 2.13.0: https://www.scala-lang.org/api/current/scala/PartialFunction.html#composeA:A=%3ER
Scala 3.6.3 gets it wrong in the same way.