Closed
Description
Compiler version
Airstream released v17.2.0, which introduce a macro that help users to "split" signal of a ADT into signal of its children.
This macros re-arranges case
blocks and create a match
expr out of it, there for leverages the compiler's exhaustive checking.
It works on 3.3.4
, but stop working on >=3.4.0
Minimized code (required Airstream v17.2.0)
import com.raquo.laminar.api.L.*
object Main {
sealed abstract class Page {}
sealed abstract class ToolPage extends Page {}
case object CompilePage extends ToolPage {}
case object AsmEmulatePage extends ToolPage {}
case object BugHuntersPage extends Page {}
def testSignal(pageSignal: Signal[ToolPage]): Unit = {
pageSignal
.splitMatchOne
.handleValue(CompilePage)(())
.toSignal
}
def main(args: Array[String]): Unit = ()
}
Expectation
on scala 3.3.4 LTS
, compiler will warn "match may not exhaustive".
it should remains so on >=3.4
UPDATED: further checking yields the following results:
3.3.4 works, 3.4.0 doesn't, 3.5.0 doesn't, 3.5.1 works, 3.5.2 works, 3.6.2 doesn't