Open
Description
Broken out from #7, using the idea from @Mythra. Once we have #11, we get a path of what was wrong with a value - e.g. we'll know that [1, "test"]
has an error at index 1. Combined with positional information for the initial value (which is pretty easy to wire through), and an AST for the module (which we can recreate from the full original source in the codemap), we can observe if the argument is a literal list. If it is, we can then give a span that more precisely targets the field within that list that is wrong. That results in better error messages, e.g.
foo([1,"test"])
^^^^^^ -- expected an int
Metadata
Metadata
Assignees
Labels
No labels