Fix a few small issues in generators (#3919)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-06-22 13:55:33 +02:00
committed by GitHub
parent b2a6109430
commit 8ccccd9705
3 changed files with 24 additions and 10 deletions
+13 -1
View File
@@ -69,7 +69,7 @@ check_result(f.throw("throw"), "z", false)
check_throw("f.next()", "throw")
check_result(f.next(), undefined, true)
function* gen3() {
function/* generator */*/* generator */gen3() {
try {
return 8
} finally {
@@ -80,3 +80,15 @@ function* gen3() {
f = gen3()
check_result(f.next(), 1, false)
check_throw("f.throw(2)", 2)
function
/* generator */
*
/* generator */
gen4()
{
}
f = gen4()
check_result(f.next(), undefined, true)
check_throw("f.throw('Str')", "Str")