Bogus stack trace with MIR verification and wrong return type #2108
Labels
topics: error-handling
Issues involving the way SAW responds to an error condition
topics: error-messages
Issues involving the messages SAW produces on error
type: bug
Issues reporting bugs or unexpected/unwanted behavior
I just accidentally wrote a spec with a wrong return type, and this fails with a stack trace. Now that the position tracking has been degarbled upstream of this, it's become clear that something else is wrong.
The example I'm working with is complicated and has lots of saw-script support code, so the stack trace is fairly substantial. This reveals that it's fairly off:
mir_unsafe_assume_spec
, the other attributed to the function passed tomir_unsafe_assume_spec
and located at the partial closure in themir_unsafe_assume_spec
call site.mir_return
that failed is never directly mentioned, although it's near the location of the second-last entry.It appears that the positions and functions are misaligned, possibly with a bad
zip
or equivalent, but there's also something odd going on with closures, and what should probably be the last entry (the failingmir_return
) is missing.This wants a simpler test, or possibly two (one for the closure) but that probably won't be that difficult.
The text was updated successfully, but these errors were encountered: