Skip to content

Commit a7d06bb

Browse files
committed
Add test for break in class body too
1 parent b25a44f commit a7d06bb

File tree

1 file changed

+8
-0
lines changed
  • graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/test/parser

1 file changed

+8
-0
lines changed

graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/test/parser/BasicTests.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,14 @@ public void for16() throws Exception {
504504
" continue\n");
505505
}
506506

507+
@Test
508+
public void for17() throws Exception {
509+
checkSyntaxError(
510+
"for i in range(10):\n" +
511+
" class foo:\n" +
512+
" break\n");
513+
}
514+
507515
@Test
508516
public void global01() throws Exception {
509517
checkScopeAndTree();

0 commit comments

Comments
 (0)