diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h index bd9ef707b6..e4947f208a 100644 --- a/src/parsing/parser-base.h +++ b/src/parsing/parser-base.h @@ -3027,7 +3027,7 @@ ParserBase::ParseArrowFunctionLiteral( // Multiple statement body Consume(Token::LBRACE); bool is_lazily_parsed = - (mode() == PARSE_LAZILY && scope_->AllowsLazyCompilation()); + (mode() == PARSE_LAZILY && scope_->AllowsLazyParsing()); if (is_lazily_parsed) { body = this->NewStatementList(0, zone()); this->SkipLazyFunctionBody(&materialized_literal_count, diff --git a/test/mjsunit/regress/regress-crbug-580934.js b/test/mjsunit/regress/regress-crbug-580934.js new file mode 100644 index 0000000000..02cbfca796 --- /dev/null +++ b/test/mjsunit/regress/regress-crbug-580934.js @@ -0,0 +1,18 @@ +// Copyright 2016 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// +// Flags: --min-preparse-length=0 + +"use strict"; +{ + let one = () => { + return "example.com"; + }; + + let two = () => { + return one(); + }; + + assertEquals("example.com", two()); +}