aboutsummaryrefslogblamecommitdiff
path: root/tests/run/t6188.scala
blob: b6261580e6bea50f3bae358bf3b47054662bfab9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                                        
// SI-6188 Optimizer incorrectly removes method invocations containing throw expressions

import scala.util.Success

object Test {
 def main(args: Array[String]): Unit = {
   val e = new Exception("this is an exception")
   val res = Success(1).flatMap[Int](x => throw e)
   println(res)
 }
}