fold_constants used to do this when it was overly aggressive. Fixes the ICE when accessing an array in a struct via a pointer.
Fixes not being able to compare with eg [1, 2, 3]
It is now in its own file and uses table lookups to check for valid type and operator combinations, and also the resulting type of the expression. This probably breaks multiple function calls in the one expression.