Mercurial > octave
diff libinterp/octave-value/ov.cc @ 29369:c75996cbe3ba
Emit more specific error when two different integer types used in range (bug #59899).
* ov.cc (colon_op): Add a case to switch statement for "btyp_unknown" and emit
error about incompatible types.
* range.tst: Add BIST tests for incompatible and invalid range types.
Add xtest BIST tests for bug #59899 for code that still needs to be
written.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 13 Feb 2021 18:22:39 -0800 |
parents | 7854d5752dd2 |
children | 65979d33f147 |
line wrap: on
line diff
--- a/libinterp/octave-value/ov.cc Sat Feb 13 13:59:49 2021 -0800 +++ b/libinterp/octave-value/ov.cc Sat Feb 13 18:22:39 2021 -0800 @@ -3103,6 +3103,9 @@ case btyp_char: return make_range<char> (base, increment, limit, is_for_cmd_expr); + case btyp_unknown: + error ("incompatible types found in range expression"); + default: error ("invalid types found in range expression"); }