diff -r 910737d41605 libinterp/octave-value/ov.cc --- a/libinterp/octave-value/ov.cc Mon Oct 14 17:33:24 2019 -0700 +++ b/libinterp/octave-value/ov.cc Tue Oct 15 11:14:04 2019 -0700 @@ -25,6 +25,9 @@ along with Octave; see the file COPYING. # include "config.h" #endif +#include + + #include "data-conv.h" #include "quit.h" #include "str-vec.h" @@ -2510,6 +2513,9 @@ do_colon_op (const octave_value& base, c { octave_value retval; + //warning ("running do_colon_op"); + std::cerr << "running do_colon_op\n"; + if (base.isobject () || increment.isobject () || limit.isobject ()) { std::string dispatch_type; @@ -2550,6 +2556,14 @@ do_colon_op (const octave_value& base, c bool result_is_str = (base.is_string () && limit.is_string ()); bool dq_str = (base.is_dq_string () || limit.is_dq_string ()); + if (base.numel () > 1 || limit.numel () > 1 + || (increment.is_defined () && increment.numel () > 1)) + { + std::cerr << "Got here\n"; + warning ("colon arguments should be scalars"); + std::cerr << "Got here2\n"; + } + if (base.iscomplex () || limit.iscomplex () || (increment.is_defined () && increment.iscomplex ())) warning ("imaginary part of complex colon arguments is ignored");