We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5af8552 + ce1bb20 commit e6ca447Copy full SHA for e6ca447
library/src/scala/util/ChainingOps.scala
@@ -7,7 +7,7 @@ trait ChainingSyntax {
7
8
/** Adds chaining methods `tap` and `pipe` to every type.
9
*/
10
-final class ChainingOps[A](val self: A) extends AnyVal {
+final class ChainingOps[A](private val self: A) extends AnyVal {
11
/** Applies `f` to the value for its side effects, and returns the original value.
12
*
13
* {{{
@@ -20,7 +20,7 @@ final class ChainingOps[A](val self: A) extends AnyVal {
20
* @tparam U the result type of the function `f`.
21
* @return the original value `self`.
22
23
- def tap[U](f: A => U): self.type = {
+ def tap[U](f: A => U): A = {
24
f(self)
25
self
26
}
0 commit comments