Index: test/mjsunit/delay-syntax-error.js |
diff --git a/test/mjsunit/delay-syntax-error.js b/test/mjsunit/delay-syntax-error.js |
index 4fcb1435c574c8d609a102b0d9ceaa955e6dae17..64cc1429bbcb2fc7c43d00a88c6d17f0e9142a95 100644 |
--- a/test/mjsunit/delay-syntax-error.js |
+++ b/test/mjsunit/delay-syntax-error.js |
@@ -25,17 +25,18 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// To be compatible with KJS syntax errors for illegal return, break |
-// and continue should be delayed to runtime. |
+// To be compatible with JSC syntax errors for illegal returns should be delayed |
+// to runtime. |
+// Invalid continue and break statements are caught at compile time. |
-// Do not throw syntax errors for illegal return, break and continue |
-// at compile time. |
+// Do not throw syntax errors for illegal return at compile time. |
assertDoesNotThrow("if (false) return;"); |
-assertDoesNotThrow("if (false) break;"); |
-assertDoesNotThrow("if (false) continue;"); |
-// Throw syntax errors for illegal return, break and continue at |
-// compile time. |
+// Throw syntax errors for illegal break and continue at compile time. |
+assertThrows("if (false) break;"); |
+assertThrows("if (false) continue;"); |
+ |
+// Throw syntax errors for illegal return, break and continue at runtime. |
assertThrows("return;"); |
assertThrows("break;"); |
assertThrows("continue;"); |