We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d30a836 + fe64592 commit 0cab7d6Copy full SHA for 0cab7d6
2 files changed
pcc/runtime/purescript.cc
@@ -104,7 +104,8 @@ auto any::unthunkVariant(const any& a) -> const any& {
104
return *variant;
105
}
106
107
-auto any::operator[](const size_t rhs) const -> const any& {
+auto any::operator[](const int rhs) const -> const any& {
108
+ assert(rhs >= 0);
109
const auto& xs = static_cast<const array&>(*this);
110
return xs[rhs];
111
pcc/runtime/purescript.hh
@@ -346,7 +346,7 @@ class any {
346
return static_cast<T>(rawPointer());
347
348
349
- auto operator[](const size_t) const -> const any&;
+ auto operator[](const int) const -> const any&;
350
auto at(const char *) const -> const any&;
351
auto size() const -> size_t;
352
auto empty() const -> bool;
0 commit comments