<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - ASSERTION FAILED: "We should only declare a function as a lexically scoped variable in scopes where var declarations aren't allowed. ..." for function redeclaration with async function module export"
href="https://bugs.webkit.org/show_bug.cgi?id=168844">168844</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ASSERTION FAILED: "We should only declare a function as a lexically scoped variable in scopes where var declarations aren't allowed. ..." for function redeclaration with async function module export
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Local Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>JavaScriptCore
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>andre.bargull@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>svn revision: 212968
Test case:
---
checkModuleSyntax("function f(){} export async function f() {}");
---
Fails with:
---
ASSERTION FAILED: We should only declare a function as a lexically scoped variable in scopes where var declarations aren't allowed. I.e, in strict mode and not at the top-level scope of a function or program.
---
Stacktrace:
---
#0 0x00007ffff6d97a4e in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:323
#1 0x00007ffff698fad8 in JSC::Scope::declareFunction (this=0x7fffffffa100, ident=0x7fffef5d9200, declareAsVar=false, isSloppyModeHoistingCandidate=false)
at ../../Source/JavaScriptCore/parser/Parser.h:397
#2 0x00007ffff699d3e1 in JSC::Parser<JSC::Lexer<unsigned char> >::declareFunction (this=0x7fffffffa0f0, ident=0x7fffef5d9200) at ../../Source/JavaScriptCore/parser/Parser.h:1228
#3 0x00007ffff69cf8ef in JSC::Parser<JSC::Lexer<unsigned char> >::parseAsyncFunctionDeclaration<JSC::ASTBuilder> (this=0x7fffffffa0f0, context=...,
exportType=JSC::Parser<JSC::Lexer<unsigned char> >::ExportType::Exported, declarationDefaultContext=JSC::DeclarationDefaultContext::Standard) at ../../Source/JavaScriptCore/parser/Parser.cpp:2474
#4 0x00007ffff69bc262 in JSC::Parser<JSC::Lexer<unsigned char> >::parseExportDeclaration<JSC::ASTBuilder> (this=0x7fffffffa0f0, context=...) at ../../Source/JavaScriptCore/parser/Parser.cpp:3301
#5 0x00007ffff69ad691 in JSC::Parser<JSC::Lexer<unsigned char> >::parseModuleSourceElements<JSC::ASTBuilder> (this=0x7fffffffa0f0, context=..., parseMode=JSC::SourceParseMode::ModuleAnalyzeMode)
at ../../Source/JavaScriptCore/parser/Parser.cpp:380
#6 0x00007ffff699dbf1 in JSC::Parser<JSC::Lexer<unsigned char> >::parseInner (this=0x7fffffffa0f0, calleeName=..., parseMode=JSC::SourceParseMode::ModuleAnalyzeMode)
at ../../Source/JavaScriptCore/parser/Parser.cpp:207
#7 0x00007ffff62f27a1 in JSC::Parser<JSC::Lexer<unsigned char> >::parse<JSC::ModuleProgramNode> (this=0x7fffffffa0f0, error=..., calleeName=..., parseMode=JSC::SourceParseMode::ModuleAnalyzeMode)
at ../../Source/JavaScriptCore/parser/Parser.h:1811
#8 0x00007ffff62f2167 in JSC::parse<JSC::ModuleProgramNode> (vm=0x7fffaf000000, source=..., name=..., builtinMode=JSC::JSParserBuiltinMode::NotBuiltin, strictMode=JSC::JSParserStrictMode::Strict,
scriptMode=JSC::JSParserScriptMode::Module, parseMode=JSC::SourceParseMode::ModuleAnalyzeMode, superBinding=JSC::SuperBinding::NotNeeded, error=..., positionBeforeLastNewline=0x0,
defaultConstructorKind=JSC::ConstructorKind::None, derivedContextType=JSC::DerivedContextType::None, evalContextType=JSC::EvalContextType::None, debuggerParseData=0x0)
at ../../Source/JavaScriptCore/parser/Parser.h:1900
#9 0x00007ffff6aea605 in JSC::checkModuleSyntax (exec=0x7fffffffc740, source=..., error=...) at ../../Source/JavaScriptCore/runtime/Completion.cpp:79
#10 0x0000000000466689 in functionCheckModuleSyntax (exec=0x7fffffffc740) at ../../Source/JavaScriptCore/jsc.cpp:2939
...
---</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>