Index: test/cctest/test-parsing.cc |
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
index 24beb246e480fa0b28ffd05ec0cd1178c768fe28..b5e544fb3b3fe5a4b9814aa21cd47167d44ec9b3 100644 |
--- a/test/cctest/test-parsing.cc |
+++ b/test/cctest/test-parsing.cc |
@@ -1495,8 +1495,8 @@ TEST(DiscardFunctionBody) { |
AsCall()->expression()->AsFunctionLiteral(); |
i::Scope* inner_scope = inner->scope(); |
i::FunctionLiteral* fun = nullptr; |
- if (inner_scope->declarations()->length() > 1) { |
- fun = inner_scope->declarations()->at(1)->AsFunctionDeclaration()->fun(); |
+ if (inner_scope->declarations()->length() > 0) { |
+ fun = inner_scope->declarations()->at(0)->AsFunctionDeclaration()->fun(); |
} else { |
// TODO(conradw): This path won't be hit until the other test cases can be |
// uncommented. |