Skip to content

Commit e6ca447

Browse files
authored
Merge pull request scala/scala#7036 from dwijnand/chaining-ops-tweaks
Tweaks to ChainingOps
2 parents 5af8552 + ce1bb20 commit e6ca447

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/src/scala/util/ChainingOps.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ trait ChainingSyntax {
77

88
/** Adds chaining methods `tap` and `pipe` to every type.
99
*/
10-
final class ChainingOps[A](val self: A) extends AnyVal {
10+
final class ChainingOps[A](private val self: A) extends AnyVal {
1111
/** Applies `f` to the value for its side effects, and returns the original value.
1212
*
1313
* {{{
@@ -20,7 +20,7 @@ final class ChainingOps[A](val self: A) extends AnyVal {
2020
* @tparam U the result type of the function `f`.
2121
* @return the original value `self`.
2222
*/
23-
def tap[U](f: A => U): self.type = {
23+
def tap[U](f: A => U): A = {
2424
f(self)
2525
self
2626
}

0 commit comments

Comments
 (0)