-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:inlinearea:metaprogramming:otherIssues tied to metaprogramming/macros not covered by the other labels.Issues tied to metaprogramming/macros not covered by the other labels.area:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcarea:scala.jsitype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymorestat:needs bisectionNeed to use nightly builds and git bisect to find out the commit where this issue was introducedNeed to use nightly builds and git bisect to find out the commit where this issue was introduced
Milestone
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
raquo
Metadata
Metadata
Labels
area:inlinearea:metaprogramming:otherIssues tied to metaprogramming/macros not covered by the other labels.Issues tied to metaprogramming/macros not covered by the other labels.area:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcarea:scala.jsitype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymorestat:needs bisectionNeed to use nightly builds and git bisect to find out the commit where this issue was introducedNeed to use nightly builds and git bisect to find out the commit where this issue was introduced