'\''))
{}
-TypeError::~TypeError() {}
+TypeError::~TypeError() = default;
// This is a higher-order preprocessor macro to aid going from runtime
// types to the compile time type system.
if (!idx.isInt()) {
throw TypeError("int64", idx.type());
}
- if (idx >= parray->size()) {
+ if (idx < 0 || idx >= parray->size()) {
throw std::out_of_range("out of range in dynamic array");
}
return (*parray)[idx.asInt()];