summaryrefslogtreecommitdiffstats
path: root/js/src/tests
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-04-06 06:54:09 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-04-06 06:54:09 +0200
commit4c4f8091e620a35d6d20a5b0ccc6c118e9b8e5e5 (patch)
tree41dbe7bfcc8a13cf72e4bfee337b0fb75dbb2f3b /js/src/tests
parent7d56f431ccc11f3b5e2e6deec331bd9c7a06cf80 (diff)
downloadUXP-4c4f8091e620a35d6d20a5b0ccc6c118e9b8e5e5.tar
UXP-4c4f8091e620a35d6d20a5b0ccc6c118e9b8e5e5.tar.gz
UXP-4c4f8091e620a35d6d20a5b0ccc6c118e9b8e5e5.tar.lz
UXP-4c4f8091e620a35d6d20a5b0ccc6c118e9b8e5e5.tar.xz
UXP-4c4f8091e620a35d6d20a5b0ccc6c118e9b8e5e5.zip
Remove Parser::reportBadReturn
Report simpler errors that don't use the offset of a node as location.
Diffstat (limited to 'js/src/tests')
-rw-r--r--js/src/tests/js1_7/geniter/regress-352197.js2
-rw-r--r--js/src/tests/js1_8/genexps/regress-683738.js8
2 files changed, 5 insertions, 5 deletions
diff --git a/js/src/tests/js1_7/geniter/regress-352197.js b/js/src/tests/js1_7/geniter/regress-352197.js
index 7982e12ee..495717af7 100644
--- a/js/src/tests/js1_7/geniter/regress-352197.js
+++ b/js/src/tests/js1_7/geniter/regress-352197.js
@@ -20,7 +20,7 @@ function test()
printBugNumber(BUGNUMBER);
printStatus (summary);
- expect = /TypeError: anonymous generator function returns a value/;
+ expect = /TypeError: can't use 'yield' in a function that can return a value/;
try
{
var gen = eval('(function() { { return 5; } yield 3; })');
diff --git a/js/src/tests/js1_8/genexps/regress-683738.js b/js/src/tests/js1_8/genexps/regress-683738.js
index de563645d..b0309a90e 100644
--- a/js/src/tests/js1_8/genexps/regress-683738.js
+++ b/js/src/tests/js1_8/genexps/regress-683738.js
@@ -20,7 +20,7 @@ function test()
printBugNumber(BUGNUMBER);
printStatus (summary);
- expect = "generator function foo returns a value";
+ expect = "can't use 'yield' in a function that can return a value";
try
{
actual = 'No Error';
@@ -32,7 +32,7 @@ function test()
}
reportCompare(expect, actual, summary + ": 1");
- expect = "generator function foo returns a value";
+ expect = "generator function can't return a value";
try
{
actual = 'No Error';
@@ -44,7 +44,7 @@ function test()
}
reportCompare(expect, actual, summary + ": 2");
- expect = "generator function foo returns a value";
+ expect = "can't use 'yield' in a function that can return a value";
try
{
actual = 'No Error';
@@ -56,7 +56,7 @@ function test()
}
reportCompare(expect, actual, summary + ": 3");
- expect = "generator function foo returns a value";
+ expect = "generator function can't return a value";
try
{
actual = 'No Error';