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.
1 parent d7ed4ad commit 4536318Copy full SHA for 4536318
src/test/scala/scala/next/TestOptionOpsExtensions.scala
@@ -14,5 +14,9 @@ package scala.next
14
15
final class TestOptionOpsExtensions {
16
// Compile checks the return type, no need to run as test.
17
- def tapEachReturnType(): Option[Int] = Option(5).tapEach(identity)
+ def tapEachReturnType(): Option[Int] = {
18
+ // Don't return the Option directly, so the compiler is not able to coerce a specific implicit to be used.
19
+ val opt = Option(5).tapEach(identity)
20
+ opt.map(identity)
21
+ }
22
}
0 commit comments