Klitos Kyriacou
07/22/2022, 2:44 PMwhen (Pair(bool1, bool2) {
Pair(false, false) -> {...}
Pair(false, true) -> {...}
Pair(true, false) -> {...}
Pair(true, true) -> {...}
}
Is it just because it's too difficult for the compiler to figure out that it is in fact exhaustive?dmitriy.novozhilov
07/22/2022, 2:52 PMPair
is just a regular class, like anyone elseCasey Brooks
07/22/2022, 2:57 PMelse -> error("will never happen")
line in the when, knowing that the equality checks will be exhaustive even if the compiler cannot figure it outmbonnin
07/22/2022, 3:14 PM