Typechecker gap with record argument types #2105
Labels
needs test
Issues for which we should add a regression test
tech debt
Issues that document or involve technical debt
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
unsoundness
Issues that can lead to unsoundness or false verification
I do not think saw should accept this program, but it does:
If you add another line that invokes go, it appears that the typechecker accepts the program and then execution crashes somewhere further downstream:
which produces
If in this version you substitute "foo" for "bar" in get, it accepts it; if you substitute anything else, you get "Selecting a missing field" and no crash. In other words, the problem is that the invocation of get with a mismatched record type is accepted, and then the value of that record type doesn't have an entry for the requested field so access to it blows up later.
The text was updated successfully, but these errors were encountered: