| Index: src/compiler/typer.cc
|
| diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
|
| index ca5f7b47b4d32865cff77cac6c9db6cb84c15454..c44d191652e076639122dfe80b0551dc01e86c6f 100644
|
| --- a/src/compiler/typer.cc
|
| +++ b/src/compiler/typer.cc
|
| @@ -1810,6 +1810,9 @@ Type* Typer::Visitor::TypeStringIndexOf(Node* node) {
|
| Type* Typer::Visitor::TypeCheckBounds(Node* node) {
|
| Type* index = Operand(node, 0);
|
| Type* length = Operand(node, 1);
|
| + if (index->Maybe(Type::MinusZero())) {
|
| + index = Type::Union(index, typer_->cache_.kSingletonZero, zone());
|
| + }
|
| index = Type::Intersect(index, Type::Integral32(), zone());
|
| if (!index->IsInhabited() || !length->IsInhabited()) return Type::None();
|
| double min = std::max(index->Min(), 0.0);
|
|
|