gracelang / minigrace

Self-hosting compiler for the Grace programming language
39 stars 22 forks source link

Print more information in type-errors #281

Closed IsaacOscar closed 5 years ago

IsaacOscar commented 5 years ago

Potential solution for #280

apblack commented 5 years ago

This looks like a good change. Sometimes the location information will be redundant, but more information is probably better here than less. Thank you for doing it.

You will see from the Travis-CI log above that a few tests failed. These are "good" failures, since they show that the error messages have indeed changed as you intended. Can you please change the "golden output" for these tests to correspond to the new behaviour of the error reports, so that the tests pass? Then I can merge this PR.

IsaacOscar commented 5 years ago

I have now updated the tests, and also made it print extra information when returning something of the wrong type.