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
I was working on #2217 and noticed that we do not currently have any printing logic for inline records, when I went to test what happens I noticed that somehow once inline records are introduced we don't emit an exhaustiveness error at all which is rather interesting behaviour, see below for an example:
module Test
enum Test {
Case1{ v: Void, },
Case2{ v: Void, },
}
let n = Case2{ v: void }
match (n) {
Case1{ _ } => void,
}
The code above compiles just fine and doesn't cause an exhaustiveness error even though it is clearly non exhaustive, this is extremely interesting as this isn't just a case of the record matches not being exhaustive but the actual constructor check not being exhuastive.
To the original issue as well we do not implement printing logic in Printpat.re for inline records.
The text was updated successfully, but these errors were encountered:
I was working on #2217 and noticed that we do not currently have any printing logic for inline records, when I went to test what happens I noticed that somehow once inline records are introduced we don't emit an exhaustiveness error at all which is rather interesting behaviour, see below for an example:
The code above compiles just fine and doesn't cause an exhaustiveness error even though it is clearly non exhaustive, this is extremely interesting as this isn't just a case of the record matches not being exhaustive but the actual constructor check not being exhuastive.
To the original issue as well we do not implement printing logic in
Printpat.re
for inline records.The text was updated successfully, but these errors were encountered: