You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala>objectTest {
sealedabstractclassBarrierDirectionobjectBarrierDirection {
caseobjectDownextendsBarrierDirection {
}
caseobjectUpextendsBarrierDirection {
}
(d1: BarrierDirection, d2: BarrierDirection) =>
(d1, d2) match {
case (Up, Up) | (Down, Down) =>falsecase (Down, Up) =>truecase (Up, Down) =>false
}
}
}
<console>:22:warning: match may not be exhaustive.
It would fail on the following inputs: (BarrierDirection(), Down), (BarrierDirection(), Up), (Down, BarrierDirection()), (Down, BarrierDirection()), (Down, Down), (Down, Down), (Down, Down), (Down, Up), (Down, Up), (Up, BarrierDirection()), (Up, Down), (Up, Down)
(d1, d2) match {
^
scala>objectTest {
sealedabstractclassBarrierDirectionobjectBarrierDirection {
caseobjectDownextendsBarrierDirection {
}
caseobjectUpextendsBarrierDirection {
}
(d1: BarrierDirection, d2: BarrierDirection) =>
(d1) match {
caseUp|Down=>false
}
}
}
<console>:22:warning: match may not be exhaustive.
It would fail on the following inputs: Down, Up
(d1) match {
^
objectTest {
sealedabstractclassBarrierDirectionobjectBarrierDirection {
caseobjectDownextendsBarrierDirection
(d1: BarrierDirection, d2: BarrierDirection) =>
(d1, d2) match {
case (Down, Down) =>false
}
}
}
// <console>:17: warning: match may not be exhaustive.// It would fail on the following inputs: (Down, Down), (Down, Down), (Down, Down)// (d1, d2) match {// ^
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: