Title: [248711] trunk/Source/_javascript_Core
- Revision
- 248711
- Author
- pecor...@apple.com
- Date
- 2019-08-15 01:40:05 -0700 (Thu, 15 Aug 2019)
Log Message
for-await-of has bad error message if used in non-async function
https://bugs.webkit.org/show_bug.cgi?id=200758
Reviewed by Ross Kirsling.
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseForStatement):
Improve error message.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (248710 => 248711)
--- trunk/Source/_javascript_Core/ChangeLog 2019-08-15 06:39:28 UTC (rev 248710)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-08-15 08:40:05 UTC (rev 248711)
@@ -1,3 +1,14 @@
+2019-08-15 Joseph Pecoraro <pecor...@apple.com>
+
+ for-await-of has bad error message if used in non-async function
+ https://bugs.webkit.org/show_bug.cgi?id=200758
+
+ Reviewed by Ross Kirsling.
+
+ * parser/Parser.cpp:
+ (JSC::Parser<LexerType>::parseForStatement):
+ Improve error message.
+
2019-08-14 Yusuke Suzuki <ysuz...@apple.com>
[JSC] Air does not appropriately propagate ConstFloatValue to stackmap
Modified: trunk/Source/_javascript_Core/parser/Parser.cpp (248710 => 248711)
--- trunk/Source/_javascript_Core/parser/Parser.cpp 2019-08-15 06:39:28 UTC (rev 248710)
+++ trunk/Source/_javascript_Core/parser/Parser.cpp 2019-08-15 08:40:05 UTC (rev 248711)
@@ -1323,7 +1323,7 @@
m_statementDepth++;
if (match(AWAIT)) {
- semanticFailIfFalse(currentScope()->isAsyncFunction(), "for-await-of can't be used only in async function or async generator.");
+ semanticFailIfFalse(currentScope()->isAsyncFunction(), "for-await-of can only be used in an async function or async generator");
isAwaitFor = true;
next();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes