Skip to content

Commit 0cab7d6

Browse files
committed
Merge remote-tracking branch 'pure11/pure11' into native
2 parents d30a836 + fe64592 commit 0cab7d6

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

pcc/runtime/purescript.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ auto any::unthunkVariant(const any& a) -> const any& {
104104
return *variant;
105105
}
106106

107-
auto any::operator[](const size_t rhs) const -> const any& {
107+
auto any::operator[](const int rhs) const -> const any& {
108+
assert(rhs >= 0);
108109
const auto& xs = static_cast<const array&>(*this);
109110
return xs[rhs];
110111
}

pcc/runtime/purescript.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ class any {
346346
return static_cast<T>(rawPointer());
347347
}
348348

349-
auto operator[](const size_t) const -> const any&;
349+
auto operator[](const int) const -> const any&;
350350
auto at(const char *) const -> const any&;
351351
auto size() const -> size_t;
352352
auto empty() const -> bool;

0 commit comments

Comments
 (0)