Skip to content

Commit 354383d

Browse files
committed
Merge pull request scala#4467 from nafg/patch-1
Fix scaladoc of Try#failed
2 parents 6c75bc4 + 7385a84 commit 354383d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/library/scala/util/Try.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ sealed abstract class Try[+T] {
164164
def flatten[U](implicit ev: T <:< Try[U]): Try[U]
165165

166166
/**
167-
* Completes this `Try` with an exception wrapped in a `Success`. The exception is either the exception that the
168-
* `Try` failed with (if a `Failure`) or an `UnsupportedOperationException`.
167+
* Inverts this `Try`. If this is a `Failure`, returns its exception wrapped in a `Success`.
168+
* If this is a `Success`, returns a `Failure` containing an `UnsupportedOperationException`.
169169
*/
170170
def failed: Try[Throwable]
171171

0 commit comments

Comments
 (0)