wybe icon indicating copy to clipboard operation
wybe copied to clipboard

Some errors are Unplaced

Open jimbxb opened this issue 2 years ago • 1 comments

Some errors are reported without a position. An example can be found in the issue below.

While an ideal patch would be to always have an error reported with a location, that's not always possible. Perhaps, for those cases, we can leverage the current module in the compiler, and report that location as a fallback.


On the lack of location, I believe it should always be possible to get a file-location, which would be nice to have as a fallback when we don't have a location for an error.

Originally posted by @jimbxb in https://github.com/pschachte/wybe/issues/418#issuecomment-1809827878

jimbxb avatar Nov 14 '23 09:11 jimbxb

The problem is that a fair amount of code is automatically generated in such a way that there is no sensible source location to attach. I don't think we can always ensure that there is a sensible source location for every statement or expression.

pschachte avatar Nov 21 '23 03:11 pschachte