Open
Description
Compiler version
3.7.1
Minimized example
import scala.util.boundary
import scala.util.control.Breaks.break
def foo(x: Int) = boundary:
if x < 0 then break()
else println("positive")
@main def Test = foo(-1)
Output
exception thrown when calling main method
scala.util.control.BreakControl
Expectation
If you wrote this program with an IDE that automatically inserted break
, perhaps you wouldn't check why it doesn't work (i.e. perhaps not realising that you imported the old library based solution of Scala 2.13)