It appears the issue is that ColonExpression's evaluate function returns a success result with a dummy matrix. Possible fix would be to have it return an error result, then make sure indexing expressions don't try to evaluate indices that are colons. Then anything that does try to evaluate a colon runs into an error.
example of problem sum(:, :) in MatCrab yields [1]. sum(:, :) in MATLAB yields a particularly unhelpful error message of "Undefined function or variable 'sum'."
It appears the issue is that ColonExpression's
evaluate
function returns a success result with a dummy matrix. Possible fix would be to have it return an error result, then make sure indexing expressions don't try to evaluate indices that are colons. Then anything that does try to evaluate a colon runs into an error.