Skip to content

Commit 5298be0

Browse files
committed
Add regression test for type inference scala#22713
1 parent 49286a9 commit 5298be0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/pos/i22713.scala

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import java.util.concurrent.ScheduledExecutorService
2+
import java.util.concurrent.TimeUnit
3+
4+
def Test = {
5+
val worker: ScheduledExecutorService = ???
6+
object Worker extends Runnable {
7+
def fails(): Either[Exception, Unit] = Right(worker.schedule(this, 5, TimeUnit.NANOSECONDS))
8+
def works(): Either[Exception, Unit] = Right {
9+
worker.schedule(this, 5, TimeUnit.NANOSECONDS); ()
10+
}
11+
def run(): Unit = ???
12+
}
13+
}

0 commit comments

Comments
 (0)