oden/fine/tests/expression
John Doty 85ffc0c7dd [fine] All error sentinels carry diagnostics
The system has an invariant that if you ever return an error
sentinel (error environment, error type) then that sentinel is caused
by an error that was reported to the user. We have had too many bugs
over the last little while where that was not the case!

(An example is if we mis-interpret the tree by calling `nth_tree` with
the wrong index or something, and get `None`, and think "oh must be a
syntax error", but it was really just the wrong index. Then there's an
error sentinel with no error diagnostic and we don't discover the
mistake until much farther along.)

Now we enforce this by requiring that whoever constructs the error
sentinel *prove* that they can do so by providing a diagnostic. It's
less efficient but prevents the problem.

This actually uncovered a couple of latent bugs where we were
generating error sentinels instead of a more appropriate type! Whoops!
2024-03-25 08:07:18 -07:00
..
errors [fine] All error sentinels carry diagnostics 2024-03-25 08:07:18 -07:00
alternates.fine [fine] Report errors with environments, fix match bug 2024-03-24 08:15:33 -07:00
argument.fine [fine] Parse alternate types 2024-02-01 07:56:30 -08:00
arithmetic.fine [fine] Parse alternate types 2024-02-01 07:56:30 -08:00
assignment.fine [fine] Assignments! 2024-01-19 19:08:17 -08:00
block.fine [fine] While loops, nothing 2024-02-05 06:11:37 -08:00
boolean.fine [fine] Evaluate is expressions, SO MANY BUG FIXES 2024-02-03 09:38:28 -08:00
class.fine [fine] Many more import-related shuffles 2024-02-15 06:12:18 -08:00
comparisons.fine [fine] More tests and also comparisons 2024-01-15 09:43:56 -08:00
conditional.fine [fine] Parse alternate types 2024-02-01 07:56:30 -08:00
empty_statement.fine [fine] The VM lives! We can test it a little! 2024-01-14 16:06:14 -08:00
generic_class.fine [fine] Generic garbage 2024-02-11 18:44:41 -08:00
generic_function.fine [fine] Generic garbage 2024-02-11 18:44:41 -08:00
if_mismatched_arms.fine [fine] Just some more tests 2024-02-07 10:09:36 -08:00
is.fine [fine] Implement the wildcard pattern 2024-02-04 19:36:47 -08:00
lists.fine [fine] List iteration... works? 2024-02-08 22:25:00 -08:00
loops.fine [fine] Support assignment to member, loops with iterators 2024-02-07 01:57:41 -08:00
number.fine [fine] Fiddle with tests, no errors 2024-01-14 07:05:01 -08:00
return_expression.fine [fine] fix some bugs, semantics for is 2024-02-03 07:59:49 -08:00
strings.fine [fine] Fiddle with tests, no errors 2024-01-14 07:05:01 -08:00
variable.fine [fine] Parse alternate types 2024-02-01 07:56:30 -08:00
worst_fib.fine [fine] Many test improvements, error improvements 2024-01-21 08:14:42 -08:00