Closed
Bug 352197
Opened 19 years ago
Closed 19 years ago
"yield" after "return value" does not cause an error if the "return" is in a block
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.8.1
People
(Reporter: jruderman, Assigned: brendan)
Details
(Keywords: testcase, verified1.8.1)
Attachments
(2 files)
1.61 KB,
patch
|
Details | Diff | Splinter Review | |
2.43 KB,
patch
|
mrbkap
:
review+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
js> gen = function() { { return 5; } yield 3; }
function () {
return 5;
yield 3;
}
It should have rejected the function, saying "anonymous generator function returns a value". If I pass the decompilation back to the compiler, it does reject it.
Assignee | ||
Comment 1•19 years ago
|
||
One-line fix. This fixes a long-standing bug in the strict warning for return e; vs. return:
function f() { if (x) return y; }
would get a warning, but
function f() { if (x) { return y; } }
would not.
/be
Assignee: general → brendan
Status: NEW → ASSIGNED
Attachment #237789 -
Flags: review?(mrbkap)
Attachment #237789 -
Flags: approval1.8.1?
Assignee | ||
Updated•19 years ago
|
OS: Mac OS X 10.4 → All
Priority: -- → P1
Hardware: Macintosh → All
Target Milestone: --- → mozilla1.8.1
Assignee | ||
Comment 2•19 years ago
|
||
Thanks to mrbkap for pointing out the obvious.
/be
Attachment #237824 -
Flags: review?(mrbkap)
Updated•19 years ago
|
Attachment #237824 -
Flags: review?(mrbkap) → review+
Assignee | ||
Updated•19 years ago
|
Attachment #237824 -
Flags: approval1.8.1?
Assignee | ||
Comment 3•19 years ago
|
||
Fixed on trunk, already.
/be
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 4•19 years ago
|
||
Comment on attachment 237824 [details] [diff] [review]
the right fix
a=schrep
Attachment #237824 -
Flags: approval1.8.1? → approval1.8.1+
Updated•19 years ago
|
Attachment #237789 -
Flags: approval1.8.1?
Comment 6•19 years ago
|
||
Checking in js1_5/Regress/regress-352197.js;
/cvsroot/mozilla/js/tests/js1_5/Regress/regress-352197.js,v <-- regress-352197.js
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/js/tests/js1_7/geniter/regress-352197.js,v
done
Checking in js1_7/geniter/regress-352197.js;
/cvsroot/mozilla/js/tests/js1_7/geniter/regress-352197.js,v <-- regress-352197.js
initial revision: 1.1
done
Flags: in-testsuite+
Comment 7•19 years ago
|
||
verified fixed 1.8 20060914 windows/linux 1.9 20060914 windows/mac*/linux
Status: RESOLVED → VERIFIED
Keywords: fixed1.8.1 → verified1.8.1
Updated•18 years ago
|
Attachment #237789 -
Flags: review?(mrbkap)
You need to log in
before you can comment on or make changes to this bug.
Description
•