Functions with forward-declared data as an argument incorrectly accepted as covering #3457
Labels
language: data
language: forward-definition
safety: totality
status: confirmed bug
Something isn't working
Coverage checking appears to be broken when a forward declared data type is involved.
Steps to Reproduce
Expected Behavior
I expect Idris to call out the missing case of
C
infun
or complain thatBar
hasn't been defined yet when checkingfun
.What would be the ideal behavior in this case? Ignore the
y
slot and call out the missingC
or make it an error to have undefined types when building case trees?Observed Behavior
The function
fun
is accepted as covering, despite missing theC
case. I believe it's deciding that case is impossible because one of the pattern variables doesn't have a valid constructor. Failing to distinguish between empty and no constructors defined yet.The text was updated successfully, but these errors were encountered: