Closed Tritlo closed 3 years ago
This currently works by recovery, but we should still take care to not generate such fits. The issue here is that we're replacing a &&
with discard
, which has a different precedence! So it's not really a valid hole fit, because the precedence is different. We should check for this instead of having to recover from it.
It's hard for us to check this: precedence isn't checked until during renaming, so we can't tell during typechecking whether it will work until we load... and after we load it's already failed. I think the hammer will have to do for now.