scala-debug-adapter icon indicating copy to clipboard operation
scala-debug-adapter copied to clipboard

[Scala 3] Stepping into a method containing a single pattern matching

Open adpi2 opened this issue 3 years ago • 0 comments

def foo(x: List[Int]) = foo match
  case x :: y :: tail => ???
  case x :: Nil => ???
  case Nil =>   // <= step into foo stops here
     ???   

When stepping into a method that contains a single pattern matching, the debugger first stops on the last case. Why so? Is this a "bug" in the compiler? Should we skip it in the debugger?

Is it the same in Scala 2?

adpi2 avatar Nov 10 '22 09:11 adpi2