Check the correct kid to figure out if the last catch block had a catch guard. bug 348630, r=brendan

This commit is contained in:
mrbkap%gmail.com 2006-08-14 19:12:06 +00:00
Родитель 4913d5652d
Коммит 0c2173c26f
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -2923,7 +2923,7 @@ Statement(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
do {
/* Check for another catch after unconditional catch. */
if (lastCatch && !lastCatch->pn_kid1->pn_expr) {
if (lastCatch && !lastCatch->pn_kid2) {
js_ReportCompileErrorNumber(cx, ts,
JSREPORT_TS | JSREPORT_ERROR,
JSMSG_CATCH_AFTER_GENERAL);